Views
No views yet
movie clip of LEN Vladimir Lenin, the Bolshevik, close up, photorealistic, short patchy goatee and mustache, head bold on top, in a suit and vest, etc, to awaken and summon the face of the Revolution our of his mausoleum hideout! 1import replicate
2
3input = {
4 "prompt": "LEN Vladimir Lenin",
5 "lora_url": "https://huggingface.co/alekseycalvin/lenin_wan14b_t2v_lora/resolve/main/wan2.1-14b-len-vladimir-lenin-lora.safetensors"
6}
7
8output = replicate.run(
9 "fofr/wan2.1-with-lora:f83b84064136a38415a3aff66c326f94c66859b8ad7a2cb432e2822774f07b08",
10 model="14b",
11 input=input
12)
13for index, item in enumerate(output):
14 with open(f"output_{index}.mp4", "wb") as file:
15 file.write(item.read())pip install git+https://github.com/huggingface/diffusers.git1import torch
2from diffusers.utils import export_to_video
3from diffusers import AutoencoderKLWan, WanPipeline
4from diffusers.schedulers.scheduling_unipc_multistep import UniPCMultistepScheduler
5
6model_id = "Wan-AI/Wan2.1-T2V-14B-Diffusers"
7vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
8pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
9flow_shift = 3.0 # 5.0 for 720P, 3.0 for 480P
10pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
11pipe.to("cuda")
12
13pipe.load_lora_weights("alekseycalvin/lenin_wan14b_t2v_lora")
14
15pipe.enable_model_cpu_offload() #for low-vram environments
16
17prompt = "LEN Vladimir Lenin"
18negative_prompt = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"
19
20output = pipe(
21 prompt=prompt,
22 negative_prompt=negative_prompt,
23 height=480,
24 width=832,
25 num_frames=81,
26 guidance_scale=5.0,
27).frames[0]
28export_to_video(output, "output.mp4", fps=16)