move sd_model assignment to the place where we change the sd_model
This commit is contained in:
parent
f3df261508
commit
2e30997450
|
@ -466,12 +466,16 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
|
|||
try:
|
||||
for k, v in p.override_settings.items():
|
||||
setattr(opts, k, v)
|
||||
if k == 'sd_hypernetwork': shared.reload_hypernetworks() # make onchange call for changing hypernet
|
||||
if k == 'sd_model_checkpoint': sd_models.reload_model_weights() # make onchange call for changing SD model
|
||||
if k == 'sd_vae': sd_vae.reload_vae_weights() # make onchange call for changing VAE
|
||||
if k == 'sd_hypernetwork':
|
||||
shared.reload_hypernetworks() # make onchange call for changing hypernet
|
||||
|
||||
if k == 'sd_model_checkpoint':
|
||||
sd_models.reload_model_weights() # make onchange call for changing SD model
|
||||
p.sd_model = shared.sd_model
|
||||
|
||||
if k == 'sd_vae':
|
||||
sd_vae.reload_vae_weights() # make onchange call for changing VAE
|
||||
|
||||
# Assign sd_model here to ensure that it reflects the model after any changes
|
||||
p.sd_model = shared.sd_model
|
||||
res = process_images_inner(p)
|
||||
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue
Block a user