diff --git a/scripts/Settings.py b/scripts/Settings.py index 8730f69..eab7a43 100644 --- a/scripts/Settings.py +++ b/scripts/Settings.py @@ -157,9 +157,11 @@ def layout(): #in steps will be shown, this is helpful to reduce the negative effect this option has on performance. \ #Default: True") st.session_state["defaults"].general.update_preview = True - st.session_state["defaults"].general.update_preview_frequency = st.number_input("Update Preview Frequency", value=st.session_state['defaults'].general.update_preview_frequency, - help="Specify the frequency at which the image is updated in steps, this is helpful to reduce the \ - negative effect updating the preview image has on performance. Default: 10") + st.session_state["defaults"].general.update_preview_frequency = st.number_input("Update Preview Frequency", + min_value=1, + value=st.session_state['defaults'].general.update_preview_frequency, + help="Specify the frequency at which the image is updated in steps, this is helpful to reduce the \ + negative effect updating the preview image has on performance. Default: 10") with col3: st.title("Others") @@ -326,8 +328,9 @@ def layout(): st.session_state["defaults"].txt2img.update_preview = True st.session_state["defaults"].txt2img.update_preview_frequency = st.number_input("Preview Image Update Frequency", - value=st.session_state['defaults'].txt2img.update_preview_frequency, - help="Set the default value for the frrquency of the preview image updates. Default is: 10") + min_value=1, + value=st.session_state['defaults'].txt2img.update_preview_frequency, + help="Set the default value for the frrquency of the preview image updates. Default is: 10") with col5: st.title("Variation Parameters") @@ -526,8 +529,9 @@ def layout(): st.session_state["defaults"].img2img.update_preview = True st.session_state["defaults"].img2img.update_preview_frequency = st.number_input("Img2Img Preview Image Update Frequency", - value=st.session_state['defaults'].img2img.update_preview_frequency, - help="Set the default value for the frrquency of the preview image updates. Default is: 10") + min_value=1, + value=st.session_state['defaults'].img2img.update_preview_frequency, + help="Set the default value for the frrquency of the preview image updates. Default is: 10") st.title("Variation Parameters") diff --git a/scripts/img2img.py b/scripts/img2img.py index 6241267..4eca0e0 100644 --- a/scripts/img2img.py +++ b/scripts/img2img.py @@ -446,9 +446,11 @@ def layout(): with st.expander("Preview Settings"): st.session_state["update_preview"] = st.session_state["defaults"].general.update_preview - st.session_state["update_preview_frequency"] = st.text_input("Update Image Preview Frequency", value=st.session_state['defaults'].img2img.update_preview_frequency, - help="Frequency in steps at which the the preview image is updated. By default the frequency \ - is set to 1 step.") + st.session_state["update_preview_frequency"] = st.number_input("Update Image Preview Frequency", + min_value=1, + value=st.session_state['defaults'].img2img.update_preview_frequency, + help="Frequency in steps at which the the preview image is updated. By default the frequency \ + is set to 1 step.") # with st.expander("Advanced"): with st.expander("Output Settings"): diff --git a/scripts/txt2img.py b/scripts/txt2img.py index 283245d..105788a 100644 --- a/scripts/txt2img.py +++ b/scripts/txt2img.py @@ -222,9 +222,11 @@ def layout(): with st.expander("Preview Settings"): st.session_state["update_preview"] = st.session_state["defaults"].general.update_preview - st.session_state["update_preview_frequency"] = st.text_input("Update Image Preview Frequency", value=st.session_state['defaults'].txt2img.update_preview_frequency, - help="Frequency in steps at which the the preview image is updated. By default the frequency \ - is set to 10 step.") + st.session_state["update_preview_frequency"] = st.number_input("Update Image Preview Frequency", + min_value=1, + value=st.session_state['defaults'].txt2img.update_preview_frequency, + help="Frequency in steps at which the the preview image is updated. By default the frequency \ + is set to 10 step.") with col2: preview_tab, gallery_tab = st.tabs(["Preview", "Gallery"]) diff --git a/scripts/txt2vid.py b/scripts/txt2vid.py index 773b87e..ec38208 100644 --- a/scripts/txt2vid.py +++ b/scripts/txt2vid.py @@ -155,7 +155,7 @@ def diffuse( st.session_state["previous_chunk_speed_list"], st.session_state['defaults'].txt2vid.update_preview_frequency, st.session_state["update_preview_frequency_list"]) - + #scale and decode the image latents with vae cond_latents_2 = 1 / 0.18215 * cond_latents image = pipe.vae.decode(cond_latents_2) @@ -613,9 +613,11 @@ def layout(): #By default this is enabled and the frequency is set to 1 step.") st.session_state["update_preview"] = st.session_state["defaults"].general.update_preview - st.session_state["update_preview_frequency"] = st.text_input("Update Image Preview Frequency", value=st.session_state['defaults'].txt2vid.update_preview_frequency, - help="Frequency in steps at which the the preview image is updated. By default the frequency \ - is set to 1 step.") + st.session_state["update_preview_frequency"] = st.number_input("Update Image Preview Frequency", + min_value=1, + value=st.session_state['defaults'].txt2vid.update_preview_frequency, + help="Frequency in steps at which the the preview image is updated. By default the frequency \ + is set to 1 step.") #