Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,10 +91,10 @@ pipe.load_lora_weights(
|
|
| 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=3., components=["transformer"])
|
| 95 |
-
pipe.fuse_lora(adapter_names=["lora_h"], lora_scale=
|
| 96 |
-
pipe.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1., components=["transformer_2"])
|
| 97 |
-
pipe.fuse_lora(adapter_names=["lora_l"], lora_scale=
|
| 98 |
pipe.unload_lora_weights()
|
| 99 |
|
| 100 |
|
|
@@ -183,7 +183,7 @@ def get_duration(
|
|
| 183 |
frames = get_num_frames(duration_seconds)
|
| 184 |
|
| 185 |
factor = frames * width * height / BASE_FRAMES_HEIGHT_WIDTH
|
| 186 |
-
step_duration = BASE_STEP_DURATION * factor
|
| 187 |
|
| 188 |
return 10 + int(steps) * step_duration
|
| 189 |
|
|
|
|
| 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=3.0, components=["transformer"])
|
| 95 |
+
pipe.fuse_lora(adapter_names=["lora_h"], lora_scale=3.0, components=["transformer"])
|
| 96 |
+
pipe.fuse_lora(adapter_names=["lightx2v_2"], lora_scale=1.0, components=["transformer_2"])
|
| 97 |
+
pipe.fuse_lora(adapter_names=["lora_l"], lora_scale=1.0, components=["transformer_2"])
|
| 98 |
pipe.unload_lora_weights()
|
| 99 |
|
| 100 |
|
|
|
|
| 183 |
frames = get_num_frames(duration_seconds)
|
| 184 |
|
| 185 |
factor = frames * width * height / BASE_FRAMES_HEIGHT_WIDTH
|
| 186 |
+
step_duration = BASE_STEP_DURATION * factor ** 1.5
|
| 187 |
|
| 188 |
return 10 + int(steps) * step_duration
|
| 189 |
|