a-r-r-o-w HF staff commited on
Commit
5b60748
·
verified ·
1 Parent(s): 873b55e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -0
README.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - diffusers/tuxemon
4
+ base_model:
5
+ - tencent/HunyuanVideo
6
+ library_name: diffusers
7
+ widget:
8
+ - text: Style of snomexut, A fluffy, brown-haired tuxemon with a curious expression, sporting an orange and black striped harness and unique patterned tail, explores its surroundings.
9
+ output:
10
+ url: video_0.mp4
11
+ - text: Style of snomexut, A vibrant yellow Tuxemon, wielding a fiery blue staff, joyfully manipulates swirling flames around its cheerful form.
12
+ output:
13
+ url: video_1.mp4
14
+ - text: Style of snomexut, A vibrant yellow Tuxemon, wielding a fiery blue staff, joyfully manipulates swirling flames around its cheerful form.
15
+ output:
16
+ url: video_2.mp4
17
+ - text: Style of snomexut, A menacing blue tuxemon with sharp claws and fierce fangs roars against a cosmic backdrop, its body adorned with glowing orbs and sharp pink details.
18
+ output:
19
+ url: video_3.mp4
20
+ tags:
21
+ - text-to-video
22
+ - diffusers-training
23
+ - diffusers
24
+ - lora
25
+ - hunyuan_video
26
+ - template:sd-lora
27
+ ---
28
+
29
+ # LoRA Finetune
30
+
31
+ <Gallery />
32
+
33
+ ## Model description
34
+
35
+ This is a lora finetune of https://huggingface.co/hunyuanvideo-community/HunyuanVideo.
36
+
37
+ The model was trained using [`finetrainers`](https://github.com/a-r-r-o-w/finetrainers). Training progress over time (4000 steps, 6000 steps, 8000 steps, 10000 steps):
38
+
39
+ <video src="output.mp4"> Your browser does not support the video tag. </video>
40
+
41
+ ## Download model
42
+
43
+ [Download LoRA](pytorch_lora_weights.safetensors) in the Files & Versions tab.
44
+
45
+ ## Usage
46
+
47
+ Requires the [🧨 Diffusers library](https://github.com/huggingface/diffusers) installed.
48
+
49
+ Trigger phrase: `"Style of snomexut,"`
50
+
51
+ ```python
52
+ import torch
53
+ from diffusers import HunyuanVideoPipeline, HunyuanVideoTransformer3DModel
54
+ from diffusers.utils import export_to_video
55
+
56
+ model_id = "hunyuanvideo-community/HunyuanVideo"
57
+ transformer = HunyuanVideoTransformer3DModel.from_pretrained(
58
+ model_id, subfolder="transformer", torch_dtype=torch.bfloat16
59
+ )
60
+ pipe = HunyuanVideoPipeline.from_pretrained(model_id, transformer=transformer, torch_dtype=torch.float16)
61
+ pipe.vae.enable_tiling()
62
+ pipe.to("cuda")
63
+
64
+ pipe.load_lora_weights("a-r-r-o-w/HunyuanVideo-tuxemons", adapter_name="hunyuanvideo-lora")
65
+ pipe.set_adapters("hunyuanvideo-lora", 1.2)
66
+
67
+ output = pipe(
68
+ prompt="Style of snomexut, a cat-like Tuxemon creature walks in alien-world grass, and observes its surroundings.",
69
+ height=768,
70
+ width=768,
71
+ num_frames=33,
72
+ num_inference_steps=30,
73
+ generator=torch.Generator().manual_seed(73),
74
+ ).frames[0]
75
+ export_to_video(output, "output-tuxemon.mp4", fps=15)
76
+ ```
77
+
78
+ <video src="output-tuxemon.mp4"> Your browser does not support the video tag. </video>
79
+
80
+ For more details, including weighting, merging and fusing LoRAs, check the [documentation](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters) on loading LoRAs in diffusers.
81
+
82
+ <details>
83
+ <summary> Training params </summary>
84
+
85
+ Dataset contained 250 images from `diffusers/tuxemon` and 150 samples generated from a Flux LoRA trained on the same dataset.
86
+
87
+ ```
88
+ id_token: "Style of snomexut,"
89
+ target_modules: to_q to_k to_v to_out.0 add_q_proj add_k_proj add_v_proj to_add_out
90
+ lr: 1e-5
91
+ training_steps: 10000
92
+ video_resolution_buckets: 1x768x768 1x512x512
93
+ rank: 128
94
+ lora_alpha: 128
95
+ optimizer: adamw
96
+ weight_decay: 0.01
97
+ flow_weighting_scheme: logit_normal
98
+ flow_shift: 7.0
99
+ validation_prompts: $ID_TOKEN A fluffy, brown-haired tuxemon with a curious expression, sporting an orange and black striped harness and unique patterned tail, explores its surroundings.@@@1x768x768:::$ID_TOKEN A curious yellow Tuxemon bird with large, expressive eyes and a distinctive golden beak, set against a starry black background, looks gently to its left.@@@1x768x768:::$ID_TOKEN A menacing Tuxemon with the appearance of a green and white aquatic shark, featuring sharp teeth and red eyes, emerges from the dark abyss, ready to unleash its fury.@@@1x768x768:::$ID_TOKEN A cheerful light blue tuxemon with four tentacle-like arms and sharp ears smiles playfully against a dark background.@@@1x768x768:::$ID_TOKEN A cheerful white Tuxemon with large ears and a playful expression joyfully floats in a starry outer space backdrop.@@@1x768x768:::$ID_TOKEN A finely detailed, silver-toned pin shaped like a futuristic double-barreled gun, adorned with orange textured panels, popularly associated with the Tuxemon universe.@@@1x768x768:::$ID_TOKEN A menacing blue tuxemon with sharp claws and fierce fangs roars against a cosmic backdrop, its body adorned with glowing orbs and sharp pink details.@@@1x768x768:::$ID_TOKEN A vibrant yellow Tuxemon, wielding a fiery blue staff, joyfully manipulates swirling flames around its cheerful form.@@@1x768x768:::$ID_TOKEN A fluffy, brown-haired tuxemon with a curious expression, sporting an orange and black striped harness and unique patterned tail, explores its surroundings.@@@49x768x768:::$ID_TOKEN A curious yellow Tuxemon bird with large, expressive eyes and a distinctive golden beak, set against a starry black background, looks gently to its left.@@@49x768x768:::$ID_TOKEN A menacing Tuxemon with the appearance of a green and white aquatic shark, featuring sharp teeth and red eyes, emerges from the dark abyss, ready to unleash its fury.@@@49x768x768:::$ID_TOKEN A cheerful light blue tuxemon with four tentacle-like arms and sharp ears smiles playfully against a dark background.@@@49x768x768:::$ID_TOKEN A finely detailed, silver-toned pin shaped like a futuristic double-barreled gun, adorned with orange textured panels, popularly associated with the Tuxemon universe.@@@49x768x768:::$ID_TOKEN A menacing blue tuxemon with sharp claws and fierce fangs roars against a cosmic backdrop, its body adorned with glowing orbs and sharp pink details.@@@49x768x768:::$ID_TOKEN A vibrant yellow Tuxemon, wielding a fiery blue staff, joyfully manipulates swirling flames around its cheerful form.@@@49x768x768
100
+ ```
101
+ </details>