SkyReels-V2: Infinite-length Film Generative model
SkyReels-V2: Infinite-length Film Generative model
Technical Report · Playground · Discord · Hugging Face · ModelScope
Welcome to the SkyReels V2 repository! Here, you'll find the model weights and inference code for our infinite-length film generative models. To the best of our knowledge, it represents the first open-source video generative model employing AutoRegressive Diffusion-Forcing architecture that achieves the SOTA performance among publicly available models.
# clone the repository.
git clone https://github.com/SkyworkAI/SkyReels-V2
cd SkyReels-V2
# Install dependencies. Test environment uses Python 3.10.12.
pip install -r requirements.txtYou can download our models from Hugging Face:
| Type | Model Variant | Recommended Height/Width/Frame | Link |
|---|---|---|---|
| Diffusion Forcing | 1.3B-540P | 544 * 960 * 97f | Huggingface ModelScope |
| 5B-540P | 544 * 960 * 97f | Coming Soon | |
| 5B-720P | 720 * 1280 * 121f | Coming Soon | |
| 14B-540P | 544 * 960 * 97f | Huggingface ModelScope | |
| 14B-720P | 720 * 1280 * 121f | Huggingface ModelScope | |
| Text-to-Video | 1.3B-540P | 544 * 960 * 97f | Coming Soon |
| 5B-540P | 544 * 960 * 97f | Coming Soon | |
| 5B-720P | 720 * 1280 * 121f | Coming Soon | |
| 14B-540P | 544 * 960 * 97f | Huggingface ModelScope | |
| 14B-720P | 720 * 1280 * 121f | Huggingface ModelScope | |
| Image-to-Video | 1.3B-540P | 544 * 960 * 97f | Huggingface ModelScope |
| 5B-540P | 544 * 960 * 97f | Coming Soon | |
| 5B-720P | 720 * 1280 * 121f | Coming Soon | |
| 14B-540P | 544 * 960 * 97f | Huggingface ModelScope | |
| 14B-720P | 720 * 1280 * 121f | Huggingface ModelScope | |
| Camera Director | 5B-540P | 544 * 960 * 97f | Coming Soon |
| 5B-720P | 720 * 1280 * 121f | Coming Soon | |
| 14B-720P | 720 * 1280 * 121f | Coming Soon |
After downloading, set the model path in your generation commands:
The Diffusion Forcing version model allows us to generate Infinite-Length videos. This model supports both text-to-video (T2V) and image-to-video (I2V) tasks, and it can perform inference in both synchronous and asynchronous modes. Here we demonstrate 2 running scripts as examples for long video generation. If you want to adjust the inference parameters, e.g., the duration of video, inference mode, read the Note below first.
synchronous generation for 10s video
…asynchronous generation for 30s video
model_id=Skywork/SkyReels-V2-DF-14B-540P
# asynchronous inference
python3 generate_video_df.py \
--model_id ${model_id} \
--resolution 540P \
--ar_step 5 \
--causal_block_size 5 \
--base_num_frames 97 \
--num_frames 737 \
--overlap_history 17 \
--prompt "A graceful white swan with a curved neck and delicate feathers swimming in a serene lake at dawn, its reflection perfectly mirrored in the still water as mist rises from the surface, with the swan occasionally dipping its head into the water to feed." \
--addnoise_condition 20 \
--offloadText-to-video with diffusers:
…Image-to-video with diffusers:
…Note:
- If you want to run the image-to-video (I2V) task, add
--image ${image_path}to your command and it is also better to use text-to-video (T2V)-like prompt which includes some descriptions of the first-frame image.- For long video generation, you can just switch the
--num_frames, e.g.,--num_frames 257for 10s video,--num_frames 377for 15s video,--num_frames 737for 30s video,--num_frames 1457for 60s video. The number is not strictly aligned with the logical frame number for specified time duration, but it is aligned with some training parameters, which means it may perform better. When you use asynchronous inference with causal_block_size > 1, the--num_framesshould be carefully set.- You can use
--ar_step 5to enable asynchronous inference. When asynchronous inference,--causal_block_size 5is recommended while it is not supposed to be set for synchronous generation. REMEMBER that the frame latent number inputted into the model in every iteration, e.g., base frame latent number (e.g., (97-1)//4+1=25 for base_num_frames=97) and (e.g., (237-97-(97-17)x1+17-1)//4+1=20 for base_num_frames=97, num_frames=237, overlap_history=17) for the last iteration, MUST be divided by causal_block_size. If you find it too hard to calculate and set proper values, just use our recommended setting above :). Asynchronous inference will take more steps to diffuse the whole sequence which means it will be SLOWER than synchronous mode. In our experiments, asynchronous inference may improve the instruction following and visual consistent performance.- To reduce peak VRAM, just lower the
--base_num_frames, e.g., to 77 or 57, while keeping the same generative length--num_framesyou want to generate. This may slightly reduce video quality, and it should not be set too small.--addnoise_conditionis used to help smooth the long video generation by adding some noise to the clean condition. Too large noise can cause the inconsistency as well. 20 is a recommended value, and you may try larger ones, but it is recommended to not exceed 50.- Generating a 540P video using the 1.3B model requires approximately 14.7GB peak VRAM, while the same resolution video using the 14B model demands around 51.2GB peak VRAM.
model_id=Skywork/SkyReels-V2-DF-14B-540P
# video extention
python3 generate_video_df.py \
--model_id ${model_id} \
--resolution 540P \
--ar_step 0 \
--base_num_frames 97 \
--num_frames 120 \
--overlap_history 17 \
--prompt ${prompt} \
--addnoise_condition 20 \
--offload \
--use_ret_steps \
--teacache \
--teacache_thresh 0.3 \
--video_path ${video_path}Note:
- When performing video extension, you need to pass the
--video_path ${video_path}parameter to specify the video to be extended.
model_id=Skywork/SkyReeموزیک ویدئو
قهوه لاغری
در مورد قهوه لاغری یک ویدیو بسازید
طبس
சுகேசன் பல்லு
Late at night, the brother finally comes home.
வரி ஏய்ப்பு
“தெனாலிராமனின் புத்திசாலித்தனம்”
make a boy smile
skyreels