adetailer icon indicating copy to clipboard operation
adetailer copied to clipboard

[Feature Request]: Distilled CFG in Forge (Flux)

Open Jonseed opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

You can't properly use adetailer in Forge with Flux, because distilled CFG setting is missing. It seems to default to 3.5, but there is no way to adjust it.

Describe the solution you'd like

Add distilled CFG setting to adetailer when using Forge (Flux).

Describe alternatives you've considered

Settle for 3.5, or change the default somewhere. Not sure where (I tried ui-config.json, but that didn't change it when adetailer ran).

Additional context

No response

Jonseed avatar Sep 13 '24 19:09 Jonseed

Hey @Jonseed! I'm here to assist you with any bugs, questions, or contributions you might have. Let me know how I can help!

You can add a distilled CFG setting to ADetailer when using Forge (Flux). The existing code already supports a separate CFG scale setting. You can enable and configure it using the following parameters:

  1. ad_use_cfg_scale: Set this to True to enable the use of a separate CFG scale.
  2. ad_cfg_scale: Set this to the desired CFG scale value.

Here is an example of how you can configure these settings:

adetailer_args = ADetailerArgs(
    ad_use_cfg_scale=True,
    ad_cfg_scale=7.5  # Set this to your desired CFG scale value
)

Additionally, if you are using the UI components, you can configure these settings as follows:

with gr.Column(variant="compact"):
    w.ad_use_cfg_scale = gr.Checkbox(
        label="Use separate CFG scale" + suffix(n),
        value=False,
        visible=True,
        elem_id=eid("ad_use_cfg_scale"),
    )

    w.ad_cfg_scale = gr.Slider(
        label="ADetailer CFG scale" + suffix(n),
        minimum=0.0,
        maximum=30.0,
        step=0.5,
        value=7.0,
        visible=True,
        elem_id=eid("ad_cfg_scale"),
    )

    w.ad_use_cfg_scale.change(
        gr_interactive,
        inputs=w.ad_use_cfg_scale,
        outputs=w.ad_cfg_scale,
        queue=False,
    )

This configuration will enable and set the separate CFG scale for ADetailer [1][2].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Sep 13 '24 19:09 dosubot[bot]

I can't add features that are only possible in forge. If automatic1111 adds flux support, I'll consider it. sorry.

Bing-su avatar Sep 17 '24 02:09 Bing-su

Why not? Maybe there could be a Forge/Flux branch? It seems many people have moved on from Automatic1111, which may never support Flux.

Jonseed avatar Sep 17 '24 12:09 Jonseed