Views
No views yet
1import torch
2from diffusers import CogVideoXPipeline
3from diffusers import export_to_video
4
5pipe = CogVideoXPipeline.from_pretrained(
6 "THUDM/CogVideoX-5b", torch_dtype=torch.bfloat16
7).to("cuda")
8
9pipe.load_lora_weights("Cseti/walgro1-2000.safetensors", adapter_name=["cogvideox-lora"])
10pipe.set_adapters(["cogvideox-lora"], [1.0])
11
12video = pipe("walgro1. The scene begins with a close-up of Gromit’s face, his expressive eyes filling the frame. His brow furrows slightly, ears perked forward in concentration. The soft lighting highlights the subtle details of his fur, every strand catching the warm sunlight filtering in from a nearby window. His dark, round nose twitches ever so slightly, sensing something in the air, and his gaze darts to the side, following an unseen movement. The camera lingers on Gromit’s face, capturing the subtleties of his expression—a quirked eyebrow and a knowing look that suggests he’s piecing together something clever. His silent, thoughtful demeanor speaks volumes as he watches the scene unfold with quiet intensity. The background remains out of focus, drawing all attention to the sharp intelligence in his eyes and the slight tilt of his head. In the claymation style of Wallace and Gromit.").frames[0]
13export_to_video(video, "output.mp4", fps=8)
14