Skip to content
代码片段 群组 项目
提交 2e309974 编辑于 作者: AUTOMATIC's avatar AUTOMATIC
浏览文件

move sd_model assignment to the place where we change the sd_model

上级 f3df2615
No related branches found
No related tags found
无相关合并请求
......@@ -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:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册