Zyin055 / Config-Presets

Extension for Automatic1111
MIT License
265 stars 16 forks source link

Add Model option #4

Open mcmonkey4eva opened 1 year ago

mcmonkey4eva commented 1 year ago

First off, I was thinking about wanting a feature like this for a while, I'm glad you made it!

So, feature request: right now the controllable options are limited - in particular I'd love if you add an option to set the model by name.

For example, I'd want an SD 2.1 preset that instantly changes model to SD 2.1 and width/height to 768.

There's a lot of other potentially useful options worth adding as well, so I'll just reference my own Infinite-Grid extension's option list for your consideration - https://github.com/mcmonkeyprojects/sd-infinity-grid-generator-script/blob/master/scripts/infinity_grid.py#L147-L173 Feel free to use it as a reference for ideas and/or code for adding new options.

Zyin055 commented 1 year ago

I'm hesitant to add too many fields to the presets since it reduces their flexibility.

If I could find a way in the code to not update components if they are omitted from the config then then I'd consider it, but I can't figure out how to do that.

Zyin055 commented 1 year ago

I tried adding the model as a config preset with the new "Add tracked fields..." button, but those top row buttons are actually part of the web ui settings and are out of scope for the config preset dropdown to manipulate with the way extension is currently implemented.

Adding the model, or anything else in the top row of the web ui, would require custom attention that this extension isn't designed for.

Symbiomatrix commented 1 year ago

@Zyin055 Personally I don't have much use for model swapping, but if you want, you could connect certain preset keys to lambda functions, which are then called along with a value change. It's a fairly simple and dynamic method, though naturally it would still require extra research on webui's infrastructure per such preset. I've used that method in regional to apply loading & colour correction to the mask preset. modules.sd_models.load_model