Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,13 +30,13 @@ pipe = CogVideoXImageToVideoPipeline.from_pretrained(
|
|
| 30 |
torch_dtype=torch.bfloat16)
|
| 31 |
|
| 32 |
def infer(prompt, image_path, orbit_type, progress=gr.Progress(track_tqdm=True)):
|
| 33 |
-
lora_path =
|
| 34 |
if orbit_type == "Left":
|
| 35 |
-
|
| 36 |
elif orbit_type == "Up":
|
| 37 |
-
|
| 38 |
lora_rank = 256
|
| 39 |
-
pipe.load_lora_weights(lora_path, weight_name=
|
| 40 |
pipe.fuse_lora(lora_scale=1 / lora_rank)
|
| 41 |
pipe.to("cuda")
|
| 42 |
|
|
|
|
| 30 |
torch_dtype=torch.bfloat16)
|
| 31 |
|
| 32 |
def infer(prompt, image_path, orbit_type, progress=gr.Progress(track_tqdm=True)):
|
| 33 |
+
lora_path = "checkpoints/"
|
| 34 |
if orbit_type == "Left":
|
| 35 |
+
weight_name = "orbit_left_lora_weights.safetensors"
|
| 36 |
elif orbit_type == "Up":
|
| 37 |
+
weight_name = "orbit_up_lora_weights.safetensors"
|
| 38 |
lora_rank = 256
|
| 39 |
+
pipe.load_lora_weights(lora_path, weight_name=weight_name, adapter_name="test_1")
|
| 40 |
pipe.fuse_lora(lora_scale=1 / lora_rank)
|
| 41 |
pipe.to("cuda")
|
| 42 |
|