mirror of
https://github.com/Sygil-Dev/sygil-webui.git
synced 2024-12-15 14:31:44 +03:00
Added option to set default sampler name from config file, will be useful for those wanting to change the default sampler and have it persist even when closing the UI and opening it again.
This commit is contained in:
parent
a81671d673
commit
1d4351ce91
@ -37,6 +37,7 @@ txt2img:
|
|||||||
batch_count: 1
|
batch_count: 1
|
||||||
batch_size: 1
|
batch_size: 1
|
||||||
sampling_steps: 50
|
sampling_steps: 50
|
||||||
|
default_sampler: "k_lms"
|
||||||
separate_prompts: False
|
separate_prompts: False
|
||||||
normalize_prompt_weights: True
|
normalize_prompt_weights: True
|
||||||
save_individual_images: True
|
save_individual_images: True
|
||||||
|
@ -1556,9 +1556,10 @@ def layout():
|
|||||||
|
|
||||||
with col3:
|
with col3:
|
||||||
st.session_state.sampling_steps = st.slider("Sampling Steps", value=defaults.txt2img.sampling_steps, min_value=1, max_value=250)
|
st.session_state.sampling_steps = st.slider("Sampling Steps", value=defaults.txt2img.sampling_steps, min_value=1, max_value=250)
|
||||||
sampler_name = st.selectbox("Sampling method",
|
|
||||||
["k_lms", "k_euler", "k_euler_a", "k_dpm_2", "k_dpm_2_a", "k_heun", "PLMS", "DDIM"],
|
sampler_name_list = ["k_lms", "k_euler", "k_euler_a", "k_dpm_2", "k_dpm_2_a", "k_heun", "PLMS", "DDIM"]
|
||||||
index=0, help="Sampling method to use. Default: k_lms")
|
sampler_name = st.selectbox("Sampling method", sampler_name_list,
|
||||||
|
index=sampler_name_list.index(defaults.txt2img.default_sampler), help="Sampling method to use. Default: k_euler")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user