Update README.md
Browse files
README.md
CHANGED
@@ -27,7 +27,8 @@ tags:
|
|
27 |
<Gallery />
|
28 |
|
29 |
This is a fine-tune of the [THUDM/CogVideoX-5b](https://huggingface.co/THUDM/CogVideoX-5b) model on the
|
30 |
-
[finetrainers/cakeify-smol](https://huggingface.co/datasets/finetrainers/cakeify-smol) dataset.
|
|
|
31 |
|
32 |
Code: https://github.com/a-r-r-o-w/finetrainers
|
33 |
|
@@ -61,7 +62,35 @@ video = pipeline(
|
|
61 |
width=768,
|
62 |
num_inference_steps=50
|
63 |
).frames[0]
|
64 |
-
export_to_video(video, "
|
65 |
```
|
66 |
|
67 |
-
Training logs are available on WandB [here](https://wandb.ai/diffusion-guidance/finetrainers-cogvideox/runs/q7z660f3/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
<Gallery />
|
28 |
|
29 |
This is a fine-tune of the [THUDM/CogVideoX-5b](https://huggingface.co/THUDM/CogVideoX-5b) model on the
|
30 |
+
[finetrainers/cakeify-smol](https://huggingface.co/datasets/finetrainers/cakeify-smol) dataset. We also provide
|
31 |
+
a LoRA variant of the params. Check it out [here](#lora).
|
32 |
|
33 |
Code: https://github.com/a-r-r-o-w/finetrainers
|
34 |
|
|
|
62 |
width=768,
|
63 |
num_inference_steps=50
|
64 |
).frames[0]
|
65 |
+
export_to_video(video, "output.mp4", fps=25)
|
66 |
```
|
67 |
|
68 |
+
Training logs are available on WandB [here](https://wandb.ai/diffusion-guidance/finetrainers-cogvideox/runs/q7z660f3/).
|
69 |
+
|
70 |
+
## LoRA
|
71 |
+
|
72 |
+
We extracted a 64-rank LoRA from the finetuned checkpoint (script here). This LoRA can be used to emulate the same kind of effect:
|
73 |
+
|
74 |
+
```py
|
75 |
+
from diffusers import DiffusionPipeline
|
76 |
+
from diffusers.utils import export_to_video
|
77 |
+
import torch
|
78 |
+
|
79 |
+
pipeline = DiffusionPipeline.from_pretrained("THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16).to("cuda")
|
80 |
+
pipeline.load_lora_weights("finetrainers/cakeify-v0", weight_name="extracted_cakeify_lora_64.safetensors")
|
81 |
+
|
82 |
+
prompt = """
|
83 |
+
PIKA_CAKEIFY On a gleaming glass display stand, a sleek black purse quietly commands attention. Suddenly, a knife appears and slices through the shoe, revealing a fluffy vanilla sponge at its core. Immediately, it turns into a hyper-realistic prop cake, delighting the senses with its playful juxtaposition of the everyday and the extraordinary.
|
84 |
+
"""
|
85 |
+
negative_prompt = "inconsistent motion, blurry motion, worse quality, degenerate outputs, deformed outputs"
|
86 |
+
|
87 |
+
video = pipeline(
|
88 |
+
prompt=prompt,
|
89 |
+
negative_prompt=negative_prompt,
|
90 |
+
num_frames=81,
|
91 |
+
height=512,
|
92 |
+
width=768,
|
93 |
+
num_inference_steps=50
|
94 |
+
).frames[0]
|
95 |
+
export_to_video(video, "output_lora.mp4", fps=25)
|
96 |
+
```
|