Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,7 +94,7 @@ pipe.set_adapters(["lightx2v", "lora_h", "lightx2v_2", "lora_l"], adapter_weight
|
|
| 94 |
pipe.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
|
| 95 |
pipe.fuse_lora(adapter_names=["lora_h"], lora_scale=0.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=0.
|
| 98 |
pipe.unload_lora_weights()
|
| 99 |
|
| 100 |
|
|
@@ -177,7 +177,7 @@ def get_duration(
|
|
| 177 |
progress
|
| 178 |
):
|
| 179 |
BASE_FRAMES_HEIGHT_WIDTH = 81 * 832 * 624
|
| 180 |
-
BASE_STEP_DURATION =
|
| 181 |
|
| 182 |
width, height = resize_image(input_image).size
|
| 183 |
frames = get_num_frames(duration_seconds)
|
|
@@ -191,7 +191,7 @@ def get_duration(
|
|
| 191 |
def generate_video(
|
| 192 |
input_image,
|
| 193 |
prompt,
|
| 194 |
-
steps =
|
| 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=
|
| 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 |
|
|
|
|
| 94 |
pipe.fuse_lora(adapter_names=["lightx2v"], lora_scale=3., components=["transformer"])
|
| 95 |
pipe.fuse_lora(adapter_names=["lora_h"], lora_scale=0.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=0.5, components=["transformer_2"])
|
| 98 |
pipe.unload_lora_weights()
|
| 99 |
|
| 100 |
|
|
|
|
| 177 |
progress
|
| 178 |
):
|
| 179 |
BASE_FRAMES_HEIGHT_WIDTH = 81 * 832 * 624
|
| 180 |
+
BASE_STEP_DURATION = 15
|
| 181 |
|
| 182 |
width, height = resize_image(input_image).size
|
| 183 |
frames = get_num_frames(duration_seconds)
|
|
|
|
| 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 |
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 |
|