How detect loaded model
Syrjusz opened this issue · 1 comments
Due diligence
- I checked for similar issues and couldn't find any.
- My WebUI and Unprompted are both up-to-date.
- I disabled my other extensions but the problem persists.
Describe the bug
Hi, I'm trying to change parameters of generation for different checkpoint model loaded. But I can't make it detect if certain model is used.
Prompt
[if sd_model="dreamshaperXL_v21TurboDPMSDE"][set cfg_scale]1[/set]red[/if]
[if sd_model="juggernautXL_v9Rdphoto2Lightning"][set cfg_scale]4[/set]blue[/if]
Log output
No response
Unprompted version
v10.7.0
WebUI version
v1.8.0
Other comments
No response
Hi @Syrjusz,
Sorry for the late reply.
The sd_model
variable will produce a string that contains the following: a directory path, model name, file extension, and model hash code.
You can check the value by adding this to your prompt:
[log]What is the `sd_model`? [get sd_model][/log]
You should then find something like this in your console window:
2024-04-26 03:50:23,071 (DEBUG) [Unprompted.log] What is the `sd_model`? general\reliberate_v20.safetensors [6b08e2c182]
So you can either use this full string in your [if]
conditionals, or use [substring]
to search for a partial match within the sd_variable
(such as "dreamshaperXL_v21").
Hope that helps.