GiorgioV commited on
Commit
cdd0a2f
·
verified ·
1 Parent(s): 6dfac82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -90,11 +90,11 @@ pipe.load_lora_weights(
90
  )
91
 
92
 
93
- pipe.set_adapters(["lightx2v", "lora_h", "lightx2v_2", "lora_l"], adapter_weights=[1., 0.1, 1., 0.3])
94
- pipe.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
95
- pipe.fuse_lora(adapter_names=["lora_h"], lora_scale=1., components=["transformer"])
96
  pipe.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
97
- pipe.fuse_lora(adapter_names=["lora_l"], lora_scale=1., components=["transformer_2"])
98
  pipe.unload_lora_weights()
99
 
100
 
@@ -191,7 +191,7 @@ def get_duration(
191
  def generate_video(
192
  input_image,
193
  prompt,
194
- steps = 4,
195
  negative_prompt=default_negative_prompt,
196
  duration_seconds = MAX_DURATION,
197
  guidance_scale = 1,
@@ -280,7 +280,7 @@ with gr.Blocks() as demo:
280
  negative_prompt_input = gr.Textbox(label="Negative Prompt", value=default_negative_prompt, lines=3)
281
  seed_input = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=42, interactive=True)
282
  randomize_seed_checkbox = gr.Checkbox(label="Randomize seed", value=True, interactive=True)
283
- steps_slider = gr.Slider(minimum=1, maximum=30, step=1, value=6, label="Inference Steps")
284
  guidance_scale_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1, label="Guidance Scale - high noise stage")
285
  guidance_scale_2_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1, label="Guidance Scale 2 - low noise stage")
286
 
 
90
  )
91
 
92
 
93
+ pipe.set_adapters(["lightx2v", "lora_h", "lightx2v_2", "lora_l"], adapter_weights=[1., 1., 1., 1.])
94
+ pipe.fuse_lora(adapter_names=["lightx2v"], lora_scale=1., components=["transformer"])
95
+ pipe.fuse_lora(adapter_names=["lora_h"], lora_scale=0.3, components=["transformer"])
96
  pipe.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
97
+ pipe.fuse_lora(adapter_names=["lora_l"], lora_scale=0.6, components=["transformer_2"])
98
  pipe.unload_lora_weights()
99
 
100
 
 
191
  def generate_video(
192
  input_image,
193
  prompt,
194
+ steps = 8,
195
  negative_prompt=default_negative_prompt,
196
  duration_seconds = MAX_DURATION,
197
  guidance_scale = 1,
 
280
  negative_prompt_input = gr.Textbox(label="Negative Prompt", value=default_negative_prompt, lines=3)
281
  seed_input = gr.Slider(label="Seed", minimum=0, maximum=MAX_SEED, step=1, value=42, interactive=True)
282
  randomize_seed_checkbox = gr.Checkbox(label="Randomize seed", value=True, interactive=True)
283
+ steps_slider = gr.Slider(minimum=1, maximum=30, step=1, value=8, label="Inference Steps")
284
  guidance_scale_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1, label="Guidance Scale - high noise stage")
285
  guidance_scale_2_input = gr.Slider(minimum=0.0, maximum=10.0, step=0.5, value=1, label="Guidance Scale 2 - low noise stage")
286