Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -294,7 +294,6 @@ def generate_video(
|
|
294 |
video_pipe = WanImageToVideoPipeline.from_pretrained(
|
295 |
VIDEO_MODEL_ID,
|
296 |
torch_dtype=torch.bfloat16,
|
297 |
-
variant="fp16",
|
298 |
use_safetensors=True
|
299 |
).to('cuda')
|
300 |
|
@@ -302,7 +301,9 @@ def generate_video(
|
|
302 |
try:
|
303 |
video_pipe.load_lora_weights("Kijai/WanVideo_comfy", weight_name="Wan22-Lightning-4-cfg1_bf16_v0.9.safetensors")
|
304 |
video_pipe.fuse_lora(lora_scale=1.0)
|
305 |
-
|
|
|
|
|
306 |
pass
|
307 |
|
308 |
# Clear cache before generation
|
@@ -672,7 +673,6 @@ with gr.Blocks(css=css, theme=gr.themes.Base()) as demo:
|
|
672 |
)
|
673 |
|
674 |
|
675 |
-
|
676 |
# Launch
|
677 |
if __name__ == "__main__":
|
678 |
# Don't initialize video pipeline on startup to avoid blocking
|
|
|
294 |
video_pipe = WanImageToVideoPipeline.from_pretrained(
|
295 |
VIDEO_MODEL_ID,
|
296 |
torch_dtype=torch.bfloat16,
|
|
|
297 |
use_safetensors=True
|
298 |
).to('cuda')
|
299 |
|
|
|
301 |
try:
|
302 |
video_pipe.load_lora_weights("Kijai/WanVideo_comfy", weight_name="Wan22-Lightning-4-cfg1_bf16_v0.9.safetensors")
|
303 |
video_pipe.fuse_lora(lora_scale=1.0)
|
304 |
+
print("Lightning LoRA loaded")
|
305 |
+
except Exception as e:
|
306 |
+
print(f"LoRA loading skipped: {e}")
|
307 |
pass
|
308 |
|
309 |
# Clear cache before generation
|
|
|
673 |
)
|
674 |
|
675 |
|
|
|
676 |
# Launch
|
677 |
if __name__ == "__main__":
|
678 |
# Don't initialize video pipeline on startup to avoid blocking
|