fffiloni commited on
Commit
cc5ea83
1 Parent(s): c02f410

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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 = None
34
  if orbit_type == "Left":
35
- lora_path = "checkpoints/orbit_left_lora_weights.safetensors"
36
  elif orbit_type == "Up":
37
- lora_path = "checkpoints/orbit_up_lora_weights.safetensors"
38
  lora_rank = 256
39
- pipe.load_lora_weights(lora_path, weight_name="pytorch_lora_weights.safetensors", adapter_name="test_1")
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