Spaces:
Sleeping
Sleeping
disable FILM
Browse files
app.py
CHANGED
|
@@ -171,6 +171,11 @@ def main():
|
|
| 171 |
.results-container p {
|
| 172 |
text-align: left;
|
| 173 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
</style>
|
| 175 |
""",
|
| 176 |
unsafe_allow_html=True
|
|
@@ -273,7 +278,7 @@ def main():
|
|
| 273 |
# Determine preset defaults based on selection
|
| 274 |
if preset_option.startswith("Maximum quality"):
|
| 275 |
preset_model = "Base Stable Diffusion V2-1"
|
| 276 |
-
preset_film =
|
| 277 |
preset_lcm = False
|
| 278 |
elif preset_option.startswith("Medium quality"):
|
| 279 |
preset_model = "Base Stable Diffusion V2-1"
|
|
@@ -285,7 +290,7 @@ def main():
|
|
| 285 |
preset_lcm = True
|
| 286 |
elif preset_option.startswith("Creative morph"):
|
| 287 |
preset_model = "Dreamshaper-7 (fine-tuned SD V1-5)"
|
| 288 |
-
preset_film =
|
| 289 |
preset_lcm = True
|
| 290 |
else:
|
| 291 |
# "Custom"
|
|
@@ -310,7 +315,7 @@ def main():
|
|
| 310 |
# Left Column: Keyframe Generator Parameters
|
| 311 |
with col_left:
|
| 312 |
st.markdown("##### Keyframe Generator Parameters")
|
| 313 |
-
num_frames = st.number_input("Number of keyframes (2β
|
| 314 |
lcm_default = preset_lcm if preset_lcm is not None else False
|
| 315 |
enable_lcm_lora = st.checkbox(
|
| 316 |
"Enable LCM-LoRA",
|
|
@@ -324,13 +329,37 @@ def main():
|
|
| 324 |
with col_right:
|
| 325 |
st.markdown("<div class='right-column-divider'>", unsafe_allow_html=True)
|
| 326 |
st.markdown("##### Inter-frame Interpolator Parameters")
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 334 |
help="Output video frames per second")
|
| 335 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 336 |
|
|
@@ -359,7 +388,7 @@ def main():
|
|
| 359 |
st.session_state.enable_lcm_lora = enable_lcm_lora
|
| 360 |
st.session_state.use_adain = use_adain
|
| 361 |
st.session_state.use_reschedule = use_reschedule
|
| 362 |
-
st.session_state.use_film = use_film
|
| 363 |
st.session_state.film_recursions = film_recursions
|
| 364 |
st.session_state.output_fps = output_fps
|
| 365 |
|
|
@@ -417,7 +446,7 @@ def main():
|
|
| 417 |
enable_lcm_lora = st.session_state.enable_lcm_lora
|
| 418 |
use_adain = st.session_state.use_adain
|
| 419 |
use_reschedule = st.session_state.use_reschedule
|
| 420 |
-
use_film = st.session_state.use_film
|
| 421 |
film_recursions = st.session_state.film_recursions
|
| 422 |
output_fps = st.session_state.output_fps
|
| 423 |
|
|
@@ -466,7 +495,7 @@ def main():
|
|
| 466 |
cmd.append("--use_adain")
|
| 467 |
if use_reschedule:
|
| 468 |
cmd.append("--use_reschedule")
|
| 469 |
-
if use_film:
|
| 470 |
cmd.append("--use_film")
|
| 471 |
|
| 472 |
# Add film recursion parameter
|
|
|
|
| 171 |
.results-container p {
|
| 172 |
text-align: left;
|
| 173 |
}
|
| 174 |
+
/* Disabled checkbox and label styling */
|
| 175 |
+
.disabled-checkbox {
|
| 176 |
+
opacity: 0.5;
|
| 177 |
+
cursor: not-allowed;
|
| 178 |
+
}
|
| 179 |
</style>
|
| 180 |
""",
|
| 181 |
unsafe_allow_html=True
|
|
|
|
| 278 |
# Determine preset defaults based on selection
|
| 279 |
if preset_option.startswith("Maximum quality"):
|
| 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"
|
|
|
|
| 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"
|
|
|
|
| 315 |
# Left Column: Keyframe Generator Parameters
|
| 316 |
with col_left:
|
| 317 |
st.markdown("##### Keyframe Generator Parameters")
|
| 318 |
+
num_frames = st.number_input("Number of keyframes (2β50)", min_value=2, max_value=50, value=24)
|
| 319 |
lcm_default = preset_lcm if preset_lcm is not None else False
|
| 320 |
enable_lcm_lora = st.checkbox(
|
| 321 |
"Enable LCM-LoRA",
|
|
|
|
| 329 |
with col_right:
|
| 330 |
st.markdown("<div class='right-column-divider'>", unsafe_allow_html=True)
|
| 331 |
st.markdown("##### Inter-frame Interpolator Parameters")
|
| 332 |
+
|
| 333 |
+
# Disabled FILM checkbox with warning message
|
| 334 |
+
st.markdown(
|
| 335 |
+
"""
|
| 336 |
+
<div class="disabled-checkbox">
|
| 337 |
+
<input type="checkbox" disabled>
|
| 338 |
+
<span>Use FILM interpolation</span>
|
| 339 |
+
</div>
|
| 340 |
+
""",
|
| 341 |
+
unsafe_allow_html=True
|
| 342 |
+
)
|
| 343 |
+
st.info("Unfortunately, FILM is not available for use on the HF Demo, please select other choices.")
|
| 344 |
+
|
| 345 |
+
# Always set use_film to False since it's disabled
|
| 346 |
+
use_film = False
|
| 347 |
+
|
| 348 |
+
# Disabled FILM recursion parameter with warning message
|
| 349 |
+
st.markdown(
|
| 350 |
+
"""
|
| 351 |
+
<div class="disabled-checkbox">
|
| 352 |
+
<span>FILM recursion passes (1β6)</span>
|
| 353 |
+
</div>
|
| 354 |
+
""",
|
| 355 |
+
unsafe_allow_html=True
|
| 356 |
+
)
|
| 357 |
+
film_recursions = 3 # Default value, but it won't be used since FILM is disabled
|
| 358 |
+
st.info("Unfortunately, FILM is not available for use on the HF Demo, please select other choices.")
|
| 359 |
+
|
| 360 |
+
# Set default FPS - always use the non-FILM default since FILM is disabled
|
| 361 |
+
default_fps = 10
|
| 362 |
+
output_fps = st.number_input("Output FPS (1β60)", min_value=1, max_value=60, value=default_fps,
|
| 363 |
help="Output video frames per second")
|
| 364 |
st.markdown("</div>", unsafe_allow_html=True)
|
| 365 |
|
|
|
|
| 388 |
st.session_state.enable_lcm_lora = enable_lcm_lora
|
| 389 |
st.session_state.use_adain = use_adain
|
| 390 |
st.session_state.use_reschedule = use_reschedule
|
| 391 |
+
st.session_state.use_film = use_film # Always False now
|
| 392 |
st.session_state.film_recursions = film_recursions
|
| 393 |
st.session_state.output_fps = output_fps
|
| 394 |
|
|
|
|
| 446 |
enable_lcm_lora = st.session_state.enable_lcm_lora
|
| 447 |
use_adain = st.session_state.use_adain
|
| 448 |
use_reschedule = st.session_state.use_reschedule
|
| 449 |
+
use_film = st.session_state.use_film # Always False now
|
| 450 |
film_recursions = st.session_state.film_recursions
|
| 451 |
output_fps = st.session_state.output_fps
|
| 452 |
|
|
|
|
| 495 |
cmd.append("--use_adain")
|
| 496 |
if use_reschedule:
|
| 497 |
cmd.append("--use_reschedule")
|
| 498 |
+
if use_film: # disabled, no cudnn on hf
|
| 499 |
cmd.append("--use_film")
|
| 500 |
|
| 501 |
# Add film recursion parameter
|