Spaces:
Running
Running
increase frames and fps for max preset
Browse files
app.py
CHANGED
@@ -280,23 +280,33 @@ def main():
|
|
280 |
preset_model = "Base Stable Diffusion V2-1"
|
281 |
preset_film = False # Changed to False as FILM is disabled
|
282 |
preset_lcm = False
|
|
|
|
|
283 |
elif preset_option.startswith("Medium quality"):
|
284 |
preset_model = "Base Stable Diffusion V2-1"
|
285 |
preset_film = False
|
286 |
preset_lcm = False
|
|
|
|
|
287 |
elif preset_option.startswith("Low quality"):
|
288 |
preset_model = "Base Stable Diffusion V2-1"
|
289 |
preset_film = False
|
290 |
preset_lcm = True
|
|
|
|
|
291 |
elif preset_option.startswith("Creative morph"):
|
292 |
preset_model = "Dreamshaper-7 (fine-tuned SD V1-5)"
|
293 |
preset_film = False # Changed to False as FILM is disabled
|
294 |
preset_lcm = True
|
|
|
|
|
295 |
else:
|
296 |
# "Custom"
|
297 |
preset_model = None
|
298 |
preset_film = None
|
299 |
preset_lcm = None
|
|
|
|
|
300 |
|
301 |
advanced_expanded = True if preset_option.endswith("βοΈ") else False
|
302 |
|
@@ -315,7 +325,9 @@ def main():
|
|
315 |
# Left Column: Keyframe Generator Parameters
|
316 |
with col_left:
|
317 |
st.markdown("##### Keyframe Generator Parameters")
|
318 |
-
|
|
|
|
|
319 |
lcm_default = preset_lcm if preset_lcm is not None else False
|
320 |
enable_lcm_lora = st.checkbox(
|
321 |
"Enable LCM-LoRA",
|
@@ -346,8 +358,8 @@ def main():
|
|
346 |
use_film = False
|
347 |
film_recursions = 3 # placeholder value, but it won't be used since FILM is disabled
|
348 |
|
349 |
-
# Set default FPS
|
350 |
-
default_fps = 10
|
351 |
output_fps = st.number_input("Output FPS (1β60)", min_value=1, max_value=60, value=default_fps,
|
352 |
help="Output video frames per second")
|
353 |
st.markdown("</div>", unsafe_allow_html=True)
|
|
|
280 |
preset_model = "Base Stable Diffusion V2-1"
|
281 |
preset_film = False # Changed to False as FILM is disabled
|
282 |
preset_lcm = False
|
283 |
+
preset_frames = 48 # Increased for maximum quality
|
284 |
+
preset_fps = 20 # Increased for maximum quality
|
285 |
elif preset_option.startswith("Medium quality"):
|
286 |
preset_model = "Base Stable Diffusion V2-1"
|
287 |
preset_film = False
|
288 |
preset_lcm = False
|
289 |
+
preset_frames = 24 # Default frame count
|
290 |
+
preset_fps = 10 # Default FPS
|
291 |
elif preset_option.startswith("Low quality"):
|
292 |
preset_model = "Base Stable Diffusion V2-1"
|
293 |
preset_film = False
|
294 |
preset_lcm = True
|
295 |
+
preset_frames = 24 # Default frame count
|
296 |
+
preset_fps = 10 # Default FPS
|
297 |
elif preset_option.startswith("Creative morph"):
|
298 |
preset_model = "Dreamshaper-7 (fine-tuned SD V1-5)"
|
299 |
preset_film = False # Changed to False as FILM is disabled
|
300 |
preset_lcm = True
|
301 |
+
preset_frames = 24 # Default frame count
|
302 |
+
preset_fps = 10 # Default FPS
|
303 |
else:
|
304 |
# "Custom"
|
305 |
preset_model = None
|
306 |
preset_film = None
|
307 |
preset_lcm = None
|
308 |
+
preset_frames = None
|
309 |
+
preset_fps = None
|
310 |
|
311 |
advanced_expanded = True if preset_option.endswith("βοΈ") else False
|
312 |
|
|
|
325 |
# Left Column: Keyframe Generator Parameters
|
326 |
with col_left:
|
327 |
st.markdown("##### Keyframe Generator Parameters")
|
328 |
+
# Set default based on preset
|
329 |
+
default_frames = preset_frames if preset_frames is not None else 24
|
330 |
+
num_frames = st.number_input("Number of keyframes (2β50)", min_value=2, max_value=50, value=default_frames)
|
331 |
lcm_default = preset_lcm if preset_lcm is not None else False
|
332 |
enable_lcm_lora = st.checkbox(
|
333 |
"Enable LCM-LoRA",
|
|
|
358 |
use_film = False
|
359 |
film_recursions = 3 # placeholder value, but it won't be used since FILM is disabled
|
360 |
|
361 |
+
# Set default FPS based on preset
|
362 |
+
default_fps = preset_fps if preset_fps is not None else 10
|
363 |
output_fps = st.number_input("Output FPS (1β60)", min_value=1, max_value=60, value=default_fps,
|
364 |
help="Output video frames per second")
|
365 |
st.markdown("</div>", unsafe_allow_html=True)
|