finetrainers/3dgs-dissolve
Viewer • Updated • 101 • 117 • 2
How to use finetrainers/Wan2.1-I2V-14B-480P-3dgs-v0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image, export_to_video
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("finetrainers/Wan2.1-I2V-14B-480P-3dgs-v0", dtype=torch.bfloat16, device_map="cuda")
pipe.to("cuda")
prompt = "3DGS_DISSOLVE A vibrant green Mustang GT parked in a parking lot. The car is positioned at an angle, showcasing its sleek design and black rims. The car's hood is black, contrasting with the green body. The car gradually transforms and bursts into red sparks, creating a dramatic and dynamic visual effect against a dark backdrop."
image = load_image(
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png"
)
output = pipe(image=image, prompt=prompt).frames[0]
export_to_video(output, "output.mp4")This is a LoRA fine-tune of the Wan-AI/Wan2.1-I2V-14B-480P-Diffusers model on the finetrainers/3dgs-dissolve dataset.
Code: https://github.com/a-r-r-o-w/finetrainers
This is an experimental checkpoint and its poor generalization is well-known.
Inference code:
import torch
from diffusers import WanImageToVideoPipeline
from diffusers.utils import export_to_video, load_image
pipe = WanImageToVideoPipeline.from_pretrained(
"Wan-AI/Wan2.1-I2V-14B-480P-Diffusers", torch_dtype=torch.bfloat16
).to("cuda")
pipe.load_lora_weights("finetrainers/Wan2.1-I2V-14B-480P-3dgs-v0", adapter_name="wan-lora")
pipe.set_adapters(["wan-lora"], [0.9])
image = load_image("<URL_OR_PATH>")
video = pipe("<my-awesome-prompt>", image=<image>).frames[0]
export_to_video(video, "output.mp4", fps=24)
Training logs are available on WandB here.
Base model
Wan-AI/Wan2.1-I2V-14B-480P