Commit
·
0790b22
1
Parent(s):
9530e57
Fixed interface
Browse files
app.py
CHANGED
@@ -40,7 +40,8 @@ try:
|
|
40 |
filename=LORA_FILENAME,
|
41 |
subfolder=LORA_SUBFOLDER
|
42 |
)
|
43 |
-
pipe.load_lora_weights(lora_path, adapter_name="fusionx")
|
|
|
44 |
print("✅ Merged FusionX LoRA loaded. Use the 'LoRA Strength' slider to control the effect.")
|
45 |
except Exception as e:
|
46 |
print(f"⚠️ Merged FusionX LoRA not loaded: {e}")
|
@@ -371,7 +372,7 @@ def generate_video(input_image, prompt, height, width,
|
|
371 |
video_path = os.path.join(temp_dir, filename)
|
372 |
|
373 |
export_to_video(output_frames_list, video_path, fps=FIXED_FPS)
|
374 |
-
return video_path, current_seed
|
375 |
|
376 |
with gr.Blocks() as demo:
|
377 |
with gr.Column(elem_classes=["main-container"]):
|
@@ -471,9 +472,9 @@ with gr.Blocks() as demo:
|
|
471 |
video_output = gr.Video(
|
472 |
label="🎥 FusionX Enhanced Generated Video",
|
473 |
autoplay=True,
|
474 |
-
interactive=False
|
475 |
-
download=True
|
476 |
)
|
|
|
477 |
|
478 |
input_image_component.upload(
|
479 |
fn=handle_image_upload_for_dims_wan,
|
@@ -492,7 +493,7 @@ with gr.Blocks() as demo:
|
|
492 |
negative_prompt_input, duration_seconds_input,
|
493 |
guidance_scale_input, steps_slider, lora_scale_slider, seed_input, randomize_seed_checkbox
|
494 |
]
|
495 |
-
generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=[video_output, seed_input])
|
496 |
|
497 |
|
498 |
if __name__ == "__main__":
|
|
|
40 |
filename=LORA_FILENAME,
|
41 |
subfolder=LORA_SUBFOLDER
|
42 |
)
|
43 |
+
pipe.unet.load_lora_weights(lora_path, adapter_name="fusionx")
|
44 |
+
pipe.set_adapters(["fusionx"])
|
45 |
print("✅ Merged FusionX LoRA loaded. Use the 'LoRA Strength' slider to control the effect.")
|
46 |
except Exception as e:
|
47 |
print(f"⚠️ Merged FusionX LoRA not loaded: {e}")
|
|
|
372 |
video_path = os.path.join(temp_dir, filename)
|
373 |
|
374 |
export_to_video(output_frames_list, video_path, fps=FIXED_FPS)
|
375 |
+
return video_path, current_seed, gr.File(value=video_path, visible=True, label=f"📥 Download: {filename}")
|
376 |
|
377 |
with gr.Blocks() as demo:
|
378 |
with gr.Column(elem_classes=["main-container"]):
|
|
|
472 |
video_output = gr.Video(
|
473 |
label="🎥 FusionX Enhanced Generated Video",
|
474 |
autoplay=True,
|
475 |
+
interactive=False
|
|
|
476 |
)
|
477 |
+
download_output = gr.File(label="📥 Download Video", visible=False)
|
478 |
|
479 |
input_image_component.upload(
|
480 |
fn=handle_image_upload_for_dims_wan,
|
|
|
493 |
negative_prompt_input, duration_seconds_input,
|
494 |
guidance_scale_input, steps_slider, lora_scale_slider, seed_input, randomize_seed_checkbox
|
495 |
]
|
496 |
+
generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=[video_output, seed_input, download_output])
|
497 |
|
498 |
|
499 |
if __name__ == "__main__":
|