Spaces:
Paused
Paused
Update optimization.py (#4)
Browse files- Update optimization.py (23276680e2caa3d0bc9538d4e033724353d69771)
- Update app.py (ff3f17523e995748da0bf396c4d8d98beed17074)
Files changed (2)
- app.py+2-2
- optimization.py+9-9
221 unmodified lines222223224225225226227227228229230221 unmodified lines negative_prompt_input = gr.Textbox(label="Negative Prompt", value=default_negative_prompt, lines=3) seed_input = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=42, interactive=True) randomize_seed_checkbox = gr.Checkbox(label="Randomize seed", value=True, interactive=True) steps_slider = gr.Slider(minimum=1, maximum=30, step=1, value=6, label="Inference Steps") steps_slider = gr.Slider(minimum=1, maximum=30, step=1, value=4, label="Inference Steps") guidance_scale_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1, label="Guidance Scale - high noise stage") guidance_scale_2_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=3, label="Guidance Scale 2 - low noise stage") guidance_scale_2_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1, label="Guidance Scale 2 - low noise stage")
generate_button = gr.Button("Generate Video", variant="primary") with gr.Column():44 unmodified lines454647484950484950515253545556575556575859606159606162636444 unmodified lines def compile_transformer(): pipeline.load_lora_weights( "vrgamedevgirl84/Wan14BT2VFusioniX", weight_name="FusionX_LoRa/Phantom_Wan_14B_FusionX_LoRA.safetensors", adapter_name="phantom" "Kijai/WanVideo_comfy", weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors", adapter_name="lightx2v" ) kwargs_lora = {} kwargs_lora["load_into_transformer_2"] = True pipeline.load_lora_weights( "vrgamedevgirl84/Wan14BT2VFusioniX", weight_name="FusionX_LoRa/Phantom_Wan_14B_FusionX_LoRA.safetensors", adapter_name="phantom_2", **kwargs_lora "Kijai/WanVideo_comfy", weight_name="Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank128_bf16.safetensors", adapter_name="lightx2v_2", **kwargs_lora ) pipeline.set_adapters(["phantom", "phantom_2"], adapter_weights=[1., 1.]) pipeline.fuse_lora(adapter_names=["phantom"], lora_scale=3., components=["transformer"]) pipeline.fuse_lora(adapter_names=["phantom_2"], lora_scale=1., components=["transformer_2"]) pipeline.set_adapters(["lightx2v", "lightx2v_2"], adapter_weights=[1., 1.]) pipeline.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"]) pipeline.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"]) pipeline.unload_lora_weights() with capture_component_call(pipeline, 'transformer') as call:app.py+2-2
optimization.py+9-9