Skip to content

dezi-ai/ComfyUI-AnimateLCM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comfyui-AnimateLCM

Follow us: Twitter URL

Comfyui implementation for AnimateLCM [paper].

Abstract Video diffusion models has been gaining increasing attention for its ability to produce videos that are both coherent and of high fidelity. However, the iterative denoising process makes it computationally intensive and time-consuming, thus limiting its applications. Inspired by the Consistency Model (CM) that distills pretrained image diffusion models to accelerate the sampling with minimal steps and its successful extension Latent Consistency Model (LCM) on conditional image generation, we propose AnimateLCM, allowing for high-fidelity video generation within minimal steps. Instead of directly conducting consistency learning on the raw video dataset, we propose a decoupled consistency learning strategy that decouples the distillation of image generation priors and motion generation priors, which improves the training efficiency and enhance the generation visual quality. Additionally, to enable the combination of plug-and-play adapters in stable diffusion community to achieve various functions (e.g., ControlNet for controllable generation). we propose an efficient strategy to adapt existing adapters to our distilled text-conditioned video consistency model or train adapters from scratch without harming the sampling speed. We validate the proposed strategy in image-conditioned video generation and layout-conditioned video generation, all achieving top-performing results. Experimental results validate the effectiveness of our proposed method. Code and weights will be made public. More details are available at this https URL.

Installation

  1. Install Comfyui
  2. Download AnimateLCM from huggingface https://huggingface.co/wangfuyun/AnimateLCM/tree/main
  3. Place sd15_t2v_beta.ckpt to ComfyUI ComfyUI/models/animatediff_models and place sd15_lora_beta.safetensors to ComfyUI/models/loras

Statistics

For 5 step, average generation time for the advanced flow is 21s, 10 step : 42s, 20 step: 86s

Workflow

Download or drag images of the workflows into ComfyUI to instantly load the corresponding workflows!

The pure workflow using animate-diff

Run faster but with a quality trade-off

AnimateLCM.json

The advanced workflow using custom-sampler

AnimateLCM_advanced.json Reddit


Prompt

mustle manly man holding a gun, elegant, dynamic pose, highly detailed, digital painting, artstation, concept art, matte, sharp focus, illustration, art by Artgerm and Greg Rutkowski and Alphonse Mucha
LCM step=5 LCM step = 10 LCM step = 20
d5e9700e-783d-4aba-8ada-3cd795971c30-step5_00001.mp4
d5e9700e-783d-4aba-8ada-3cd795971c30-step10_00001.mp4
d5e9700e-783d-4aba-8ada-3cd795971c30-step20_00001.mp4

Prompt

cute painting of a frog dressed as a detective. The frog has a magnifying glass in one hand and a hat similar to Sherlock Holmes highly stylized, matte coloring, childish look, on a page of an illustrated book for children, drawn with Photoshop
LCM step=5 LCM step = 10 LCM step = 20
d6de0c90-9ef6-40aa-9a6b-a2edabd18f98-step5_00001.mp4
d6de0c90-9ef6-40aa-9a6b-a2edabd18f98-step10_00001.mp4
d6de0c90-9ef6-40aa-9a6b-a2edabd18f98-step20_00001.mp4

Prompt

mechwarrior 5 : mercenaries mech megaman transformer robot boss tank engine game octane render, 4 k, hd 2 0 2 2 3 d cgi rtx hdr style chrome reflexion glow fanart, global illumination ray tracing hdr fanart arstation by ian pesty by jesper ejsing pixar and disney unreal zbrush central hardmesh
LCM step=5 LCM step = 10 LCM step = 20
ebe10560-15f6-4ef6-af8b-c0691b8f7f94-step5_00001.mp4
ebe10560-15f6-4ef6-af8b-c0691b8f7f94-step10_00001.mp4
ebe10560-15f6-4ef6-af8b-c0691b8f7f94-step20_00001.mp4

Prompt

a male anthromorphic cyborg dragon, diffuse lighting, fantasy, intricate, elegant, highly detailed, lifelike, photorealistic, digital painting, artstation, illustration, concept art, smooth, sharp focus, art by john collier and albert aublet and krenz cushart and artem demura
LCM step=5 LCM step = 10 LCM step = 20
f63905dd-5167-4563-accb-aac20f832a75-step5_00001.mp4
f63905dd-5167-4563-accb-aac20f832a75-step10_00001.mp4
f63905dd-5167-4563-accb-aac20f832a75-step20_00001.mp4

Prompt

full figure bella thorne, hyperrealistic portrait, bladerunner street, art of elysium and jeremy mann and alphonse mucha, fantasy art, photo realistic, dynamic lighting, artstation, poster, volumetric lighting, very detailed face, 4 k, award winning
LCM step=5 LCM step = 10 LCM step = 20
bb8c0665-27d9-4b5a-8cb6-86b5b88112ed-step5_00001.mp4
bb8c0665-27d9-4b5a-8cb6-86b5b88112ed-step10_00001.mp4
bb8c0665-27d9-4b5a-8cb6-86b5b88112ed-step20_00001.mp4

Prompt

photographic portrait of a stunningly beautiful gothic female in soft dreamy light at sunset, contemporary fashion shoot, by edward robert hughes, annie leibovitz and steve mccurry, david lazar, jimmy nelsson, breathtaking, 8 k resolution, extremely detailed, beautiful, establishing shot, artistic, hyperrealistic, beautiful face, octane render
LCM step=5 LCM step = 10 LCM step = 20
e34b3416-3872-4de9-b3a1-1331689d3490-step5_00001.mp4
e34b3416-3872-4de9-b3a1-1331689d3490-step10_00001.mp4
e34b3416-3872-4de9-b3a1-1331689d3490-step20_00001.mp4

Prompt

realistic ethereal hydrangea dryad wearing beautiful dress, deity of hydrangeas made of hydrangeas, mystical, 4k digital masterpiece by Alberto Seveso and Anna Dittman, Ruan Jia, rossdraws, full view, fantasycore, Hyperdetailed, realistic oil on linen, soft lighting, Iconography background, featured on Artstation
LCM step=5 LCM step = 10 LCM step = 20
069c6cf5-103f-4f5d-ab3c-8d1d6977727e-step5_00001.mp4
069c6cf5-103f-4f5d-ab3c-8d1d6977727e-step10_00001.mp4
069c6cf5-103f-4f5d-ab3c-8d1d6977727e-step20_00001.mp4

Acknowledgement

This work is built on ComfyUI-AnimateDiff-Evolved, ComfyUI-VideoHelperSuite and ComfyUI-sampler-lcm-alternative but focus more on the accelearation of AnimateDiff text to video (t2v) generation.