Merge pull request #799 from ZeroCool940711/dev

Added option to set default sampler name from config file.
This commit is contained in:
ZeroCool 2022-09-07 16:59:28 -07:00 committed by GitHub
commit f8f31df899
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -37,6 +37,7 @@ txt2img:
batch_count: 1
batch_size: 1
sampling_steps: 50
default_sampler: "k_lms"
separate_prompts: False
normalize_prompt_weights: True
save_individual_images: True

View File

@ -1556,9 +1556,10 @@ def layout():
with col3:
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"],
index=0, help="Sampling method to use. Default: k_lms")
sampler_name_list = ["k_lms", "k_euler", "k_euler_a", "k_dpm_2", "k_dpm_2_a", "k_heun", "PLMS", "DDIM"]
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")