Added option to set the FPS on the txt2vid tab. (#1680)

This commit is contained in:
Alejandro Gil 2022-11-22 09:25:14 -08:00 committed by GitHub
commit 2bbd9300a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 30 deletions

View File

@ -220,6 +220,7 @@ txt2vid:
beta_scheduler_type: "scaled_linear"
max_duration_in_seconds: 30
fps: 30
LDSR_config:
sampling_steps: 50

View File

@ -1638,6 +1638,9 @@ def layout():
st.session_state["max_duration_in_seconds"] = st.number_input("Max Duration In Seconds:", value=st.session_state['defaults'].txt2vid.max_duration_in_seconds,
help="Specify the max duration in seconds you want your video to be.")
st.session_state["fps"] = st.number_input("Frames per Second (FPS):", value=st.session_state['defaults'].txt2vid.fps,
help="Specify the frame rate of the video.")
with st.expander("Preview Settings"):
#st.session_state["update_preview"] = st.checkbox("Update Image Preview", value=st.session_state['defaults'].txt2vid.update_preview,
#help="If enabled the image preview will be updated during the generation instead of at the end. \
@ -1912,7 +1915,7 @@ def layout():
height=height, weights_path=custom_model, scheduler=scheduler_name,
disable_tqdm=False, beta_start=st.session_state['defaults'].txt2vid.beta_start.value,
beta_end=st.session_state['defaults'].txt2vid.beta_end.value,
beta_schedule=beta_scheduler_type, starting_image=None)
beta_schedule=beta_scheduler_type, starting_image=None, fps=st.session_state.fps)
if video and save_video_on_stop:
if os.path.exists(video): # temporary solution to bypass exception