aboutsummaryrefslogtreecommitdiffstats
path: root/modules/extras.py
diff options
context:
space:
mode:
authorEllangoK <karun.ellango7@gmail.com>2023-01-19 02:21:52 +0000
committerEllangoK <karun.ellango7@gmail.com>2023-01-19 02:21:52 +0000
commit26a6a78b16f88a6f88f4cca3f378db3b83fc94f8 (patch)
tree9e65c1bc4fb1d11c20c2019b9ce6c6c06d6f3ef3 /modules/extras.py
parent99207bc816d027b522e1c49001748c63fd426b53 (diff)
downloadstable-diffusion-webui-gfx803-26a6a78b16f88a6f88f4cca3f378db3b83fc94f8.tar.gz
stable-diffusion-webui-gfx803-26a6a78b16f88a6f88f4cca3f378db3b83fc94f8.tar.bz2
stable-diffusion-webui-gfx803-26a6a78b16f88a6f88f4cca3f378db3b83fc94f8.zip
only lookup tertiary model if theta_func1 is set
Diffstat (limited to 'modules/extras.py')
-rw-r--r--modules/extras.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/extras.py b/modules/extras.py
index 29eb1f07..88eea22e 100644
--- a/modules/extras.py
+++ b/modules/extras.py
@@ -307,13 +307,12 @@ def run_modelmerger(primary_model_name, secondary_model_name, tertiary_model_nam
}
theta_func1, theta_func2 = theta_funcs[interp_method]
- tertiary_model_info = None
if theta_func1 and not tertiary_model_name:
shared.state.textinfo = "Failed: Interpolation method requires a tertiary model."
shared.state.end()
return [f"Failed: Interpolation method ({interp_method}) requires a tertiary model."] + [gr.Dropdown.update(choices=sd_models.checkpoint_tiles()) for _ in range(4)]
- else:
- tertiary_model_info = sd_models.checkpoints_list.get(tertiary_model_name, None)
+
+ tertiary_model_info = sd_models.checkpoints_list[tertiary_model_name] if theta_func1 else None
result_is_inpainting_model = False