Zyin055 / Config-Presets

Extension for Automatic1111
MIT License
272 stars 18 forks source link

Preset for "Tiled Diffusion & VAE" and "StableSR" #46

Closed mikheys closed 1 year ago

mikheys commented 1 year ago

Good afternoon. Please tell me how can I save the settings for the "Tiled Diffusion & VAE" and "StableSR" extensions?

Zyin055 commented 1 year ago

You use the "Add custom fields..." button to modify the config text file to include the IDs of the components you want to add. IDs are found in the HTML of the browser (F12).

For example, StableSR in the img2img tab uses these IDs:

StableSR-scale
StableSR-color-fix
StableSR-save-original
StableSR-pure-noise
mikheys commented 1 year ago

All identifiers are of the form component-xxxxx((( Although in the new automation in the settings you can save all these settings as default. Maybe somehow it can be solved?

Zyin055 commented 1 year ago

See screenshot for an example of how to get the correct ID.

Clipboard01

mikheys commented 1 year ago

image image image

what am I doing wrong?

Zyin055 commented 1 year ago

Did you save the config file and reload the UI?

mikheys commented 1 year ago

of course

Zyin055 commented 1 year ago

Did you add that ID as a tracked component in the other config file?

Clipboard01 Clipboard02

mikheys commented 1 year ago

image image

I add a new entry manually and the CD does not load at all. Could you write a complete list of all these elements to add to the file for this extension?

Zyin055 commented 1 year ago

Read the error: you are missing a comma at the end of line 44. It's invalid JSON format. I recommend you stick to using the GUI to make your preset config file instead of manually editing it yourself.

mikheys commented 1 year ago

Thanks a lot for the tip! Please write all the possible settings for this extension, so as not to catch them manually. If there is such an opportunity. Thank you very much in advance!

Zyin055 commented 1 year ago

I can't possibly write every ID for every extension. I have included a list of IDs for popular extensions in the config file by default, but that config file is only created with those new IDs for new users.

mikheys commented 1 year ago

Understood thanks!

mikheys commented 1 year ago

Here's what I got. Everything is working! Only for this it didn't work: image

StableSR (extension)

StableSR-scale StableSR-color-fix StableSR-save-original StableSR-pure-noise

Tiled Diffusion (extension)

MD-i2i-enabled MD-i2i-keep-input-size MD-i2i-method MD-i2i-control-tensor-cpu MD-i2i-latent-tile-width MD-i2i-latent-tile-height MD-i2i-latent-tile-overlap MD-i2i-latent-tile-batch-size MD-i2i-upscaler-index MD-i2i-upscaler-factor

Tiled Diffusion - Noise Inversion

MD-i2i-noise-inverse MD-i2i-noise-inverse-steps MD-i2i-noise-inverse-retouch MD-i2i-noise-inverse-renoise-strength MD-i2i-noise-inverse-renoise-kernel

Tiled VAE

tiledvae-i2i-enable tiledvae-i2i-vae2gpu tiledvae-i2i-enc-size tiledvae-i2i-dec-size tiledvae-i2i-fastenc tiledvae-i2i-fastenc-colorfix tiledvae-i2i-fastdec

Zyin055 commented 1 year ago

https://github.com/pkuliyi2015/sd-webui-stablesr/issues/24 Made a request to StableSR to give the SR Model a unique ID.

Westernnero commented 1 year ago

Hi Zyin055! I've been using your extension and I really appreicate your work!

However, may I ask that if there's an ID like "txt2img_enable_hr" which, when True, makes the dropdown box shown as dropped down?

I am using Tiled Diffusion & VAE as well. The other IDs worked. But the dropdown box will not change (Though when you manually drop it down you can see the checkbox checked correctly).

It's OK if there's no such function, but it will be better if it has. Thank you very much.

Zyin055 commented 1 year ago

@Westernnero I don't understand exactly what you're asking for.

Before A1111 1.6.0 the hires fix checkbox was labeled as txt2img_enable_hr. After 1.6.0 the checkbox was changed to an accordion (and a hidden checkbox) with ID of txt2img_hr-checkbox which works as a config preset.

Westernnero commented 1 year ago

image This is the 'dropdown box' I meant. As for Hires fix, when I change the Config Preset, the Hires fix dropbox can be shown or hidden as the preset changes.

However, since Tiled Diffusion is an extension, I don't know if its 'box' can be manipulated like this.

That is my question. Sorry for the ambiguous part.

Zyin055 commented 1 year ago

The technical term for that "dropdown box" is an accordion.

The only reason the hires accordion can be controlled in 1.6.0+ is because they use a hidden checkbox which can be controlled by Config Presets. It's a custom built accordion component by A1111. The out of the box accordion component that Gradio provides does not have that. So in order for it to be controlled, the Tiled Diffusion author would need to use the same component type that the hires fix uses which includes a hidden checkbox.

Westernnero commented 1 year ago

OK, thank you very much!

Westernnero commented 1 year ago

Hi Zyin, the old IDs for Tiled Diffusion - Tiled VAE elements changed so Config Preset would not be loaded. I tried to find the new IDs for the elements and they should be fine. Please consider contain them in the new default config files. The old ones look like "tiledvae-i2i-XXXX". Here's the new ones:

MD-i2i-enable MD-i2i-vae2gpu MD-i2i-enc-size MD-i2i-dec-size MD-i2i-fastenc MD-i2i-fastenc-colorfix MD-i2i-fastdec