cszy98 commited on
Commit
91f83b8
·
verified ·
1 Parent(s): d7af58f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -40
README.md CHANGED
@@ -11,43 +11,3 @@ tags:
11
  This repository hosts the Dual-Expert Consistency Model (DCM) as presented in the paper [Dual-Expert Consistency Model for Efficient and High-Quality Video Generation](https://huggingface.co/papers/2506.03123). DCM addresses the challenge of applying Consistency Models to video diffusion, which often leads to temporal inconsistency and loss of detail. By using a dual-expert approach, DCM achieves state-of-the-art visual quality with significantly reduced sampling steps.
12
 
13
  For more information, please refer to the project's [Github repository](https://github.com/Vchitect/DCM).
14
-
15
- ## Usage
16
-
17
- You can use this model with the `diffusers` library. Make sure you have `diffusers`, `transformers`, `torch`, `accelerate`, and `imageio` (with `imageio-ffmpeg` for MP4/GIF saving) installed.
18
-
19
- ```bash
20
- pip install diffusers transformers torch accelerate imageio[ffmpeg]
21
- ```
22
-
23
- Here is a quick example to generate a video:
24
-
25
- ```python
26
- from diffusers import DiffusionPipeline
27
- import torch
28
- import imageio
29
-
30
- # Load the pipeline
31
- # The custom_pipeline argument is necessary because the pipeline class (WanPipeline)
32
- # is defined within the repository and not part of the standard diffusers library.
33
- pipe = DiffusionPipeline.from_pretrained("Vchitect/DCM", torch_dtype=torch.float16, custom_pipeline="Vchitect/DCM", trust_remote_code=True)
34
- pipe.to("cuda")
35
-
36
- # Define the prompt and generation parameters
37
- prompt = "A futuristic car driving through a neon-lit city at night"
38
- generator = torch.Generator(device="cuda").manual_seed(0) # for reproducibility
39
-
40
- # Generate video frames
41
- video_frames = pipe(
42
- prompt=prompt,
43
- num_frames=16, # number of frames to generate
44
- num_inference_steps=4, # DCM excels at efficient generation in few steps
45
- guidance_scale=7.5, # Classifier-free guidance scale
46
- generator=generator,
47
- ).frames[0] # Assuming the output is a list containing one video (list of frames)
48
-
49
- # Save the generated video
50
- output_path = "generated_video.gif" # You can change this to .mp4 if imageio[ffmpeg] is properly set up
51
- imageio.mimsave(output_path, video_frames, fps=8) # frames per second
52
- print(f"Video saved to {output_path}")
53
- ```
 
11
  This repository hosts the Dual-Expert Consistency Model (DCM) as presented in the paper [Dual-Expert Consistency Model for Efficient and High-Quality Video Generation](https://huggingface.co/papers/2506.03123). DCM addresses the challenge of applying Consistency Models to video diffusion, which often leads to temporal inconsistency and loss of detail. By using a dual-expert approach, DCM achieves state-of-the-art visual quality with significantly reduced sampling steps.
12
 
13
  For more information, please refer to the project's [Github repository](https://github.com/Vchitect/DCM).