txt2img touch up + model switching #1139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Swapped changes from Added custom models list to the txt2img tab. #1136 in txt2img to mirror img2img logic as the commit didn't properly function and referred to txt2vid models
Made state variables consistent with img2img.
Fixed a bug in sd_utils where switching models after running would not reload the used model.
Fixed update_preview_frequency and update_preview using defaults from webui_streamlit.yaml instead of state variables from UI.
TODO: Does sd_utils 174:177 need to run every time the model is switched or should it be overwritten using load_sd_model? The if/else as written takes a while to execute if changing models between runs.config, device, model, modelCS, modelFS = load_sd_model(custom_model)
It takes a while if using the un-pruned waifu-diffusion regardless of deleting first or just overwriting. Should keep it as is.
Checklist:
dev