Update README.md
Browse files
README.md
CHANGED
@@ -48,14 +48,14 @@ import torch
|
|
48 |
from diffusers import CogVideoXImageToVideoPipeline
|
49 |
from diffusers.utils import load_image, export_to_video
|
50 |
|
51 |
-
pipe = CogVideoXImageToVideoPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to("cuda")
|
52 |
-
pipe.load_lora_weights("BelGio13/cogvideoX-I2V-locobot", weight_name="pytorch_lora_weights.safetensors", adapter_name=
|
53 |
|
54 |
# The LoRA adapter weights are determined by what was used for training.
|
55 |
# In this case, we assume `--lora_alpha` is 32 and `--rank` is 64.
|
56 |
# It can be made lower or higher from what was used in training to decrease or amplify the effect
|
57 |
# of the LoRA upto a tolerance, beyond which one might notice no effect at all or overflows.
|
58 |
-
pipe.set_adapters(
|
59 |
|
60 |
image = load_image("/path/to/image")
|
61 |
video = pipe(image=image, "", guidance_scale=6, use_dynamic_cfg=True).frames[0]
|
|
|
48 |
from diffusers import CogVideoXImageToVideoPipeline
|
49 |
from diffusers.utils import load_image, export_to_video
|
50 |
|
51 |
+
pipe = CogVideoXImageToVideoPipeline.from_pretrained("THUDM/CogVideoX-5b-I2V", torch_dtype=torch.bfloat16).to("cuda")
|
52 |
+
pipe.load_lora_weights("BelGio13/cogvideoX-I2V-locobot", weight_name="pytorch_lora_weights.safetensors", adapter_name="cogvideox-i2v-lora")
|
53 |
|
54 |
# The LoRA adapter weights are determined by what was used for training.
|
55 |
# In this case, we assume `--lora_alpha` is 32 and `--rank` is 64.
|
56 |
# It can be made lower or higher from what was used in training to decrease or amplify the effect
|
57 |
# of the LoRA upto a tolerance, beyond which one might notice no effect at all or overflows.
|
58 |
+
pipe.set_adapters("cogvideox-i2v-lora", [32 / 64])
|
59 |
|
60 |
image = load_image("/path/to/image")
|
61 |
video = pipe(image=image, "", guidance_scale=6, use_dynamic_cfg=True).frames[0]
|