Downloads · 30 days
267
51% of all-time downloads
bghira/wan2.1-1.3b-anyflow-wip
wan2.1-1.3b-anyflow-wip is a text-to-video model from bghira. Use it when you need video from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
This is a PEFT LoRA derived from Wan-AI/Wan2.1-T2V-1.3B-Diffusers.
Downloads · 30 days
267
51% of all-time downloads
All-time downloads
527
Public
Repo size
46.8 GB
Likes
0
Public
Click a slice to open those files.
.safetensors13.6 GB · 67%
From the Hugging Face model README
This is a PEFT LoRA derived from Wan-AI/Wan2.1-T2V-1.3B-Diffusers.
The main validation prompt used during training was:
A vibrant green Mustang GT parked in an empty parking lot. The camera slowly pans around the car, showing its sleek design, black hood and black rims in a clean promotional video.
1.00.04AnyFlowValidationScheduler (FlowMatchEulerDiscreteScheduler)0832x480Note: The validation settings are not necessarily the same as the training settings.
You can find some example images and videos in the following gallery:
<Gallery />The text encoder was not trained. You may reuse the base model text encoder for inference.
Training epochs: 0
Training steps: 6000
Learning rate: 6e-05
Max grad norm: 1.0
Effective batch size: 8
Gradient checkpointing: False
Prediction type: flow_matching (extra parameters=['shift=5.0'])
Optimizer: torch-adamw (config=weight_decay=0.0,eps=1e-8)
Trainable parameter precision: Pure BF16
Base model precision: no_change
Caption dropout probability: 0.1%
LoRA Rank: 256
LoRA Alpha: 256.0
LoRA Dropout: 0.0
LoRA initialisation style: default
LoRA mode: Standard
import torch
from diffusers import DiffusionPipeline
model_id = 'Wan-AI/Wan2.1-T2V-1.3B-Diffusers'
adapter_id = 'bghira/wan2.1-1.3b-anyflow-wip'
pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
pipeline.load_lora_weights(adapter_id)
prompt = "A vibrant green Mustang GT parked in an empty parking lot. The camera slowly pans around the car, showing its sleek design, black hood and black rims in a clean promotional video."
negative_prompt = '色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走'
## Optional: quantise the model to save on vram.
## Note: The model was not quantised during training, so it is not necessary to quantise it during inference time.
#from optimum.quanto import quantize, freeze, qint8
#quantize(pipeline.transformer, weights=qint8)
#freeze(pipeline.transformer)
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # the pipeline is already in its target precision level
model_output = pipeline(
prompt=prompt,
negative_prompt=negative_prompt,
num_inference_steps=4,
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1),
width=832,
height=480,
guidance_scale=1.0,
).images[0]
from diffusers.utils.export_utils import export_to_gif
export_to_gif(model_output, "output.gif", fps=16)
SimpleTuner generates a safetensors variant of the EMA weights and a pt file.
The safetensors file is intended to be used for inference, and the pt file is for continuing finetuning.
The EMA model may provide a more well-rounded result, but typically will feel undertrained compared to the full model as it is a running decayed average of the model weights.