Generative Models by Stability AI
May 20, 2025
QUICKSTART :
python scripts/sampling/simple_video_sample_4d2.py --input_path assets/sv4d_videos/camel.gif --output_folder outputs (after downloading sv4d2.safetensors from HuggingFace into checkpoints/)To run SV4D 2.0 on a single input video of 21 frames:
sv4d2.safetensors) from here to checkpoints/: huggingface-cli download stabilityai/sv4d2.0 sv4d2.safetensors --local-dir checkpointspython scripts/sampling/simple_video_sample_4d2.py --input_path <path/to/video>input_path : The input video <path/to/video> can begif or mp4 format, such as assets/sv4d_videos/camel.gif, or.jpg, .jpeg, or .png format, ornum_steps : default is 50, can decrease to it to shorten sampling time.elevations_deg : specified elevations (reletive to input view), default is 0.0 (same as input view).--remove_bg=True. To obtain higher quality outputs on real-world input videos with noisy background, try segmenting the foreground object using Clipdrop or SAM2 before running SV4D.--encoding_t=1 (of frames encoded at a time) and --decoding_t=1 (of frames decoded at a time) or lower video resolution like --img_size=512.Notes:
huggingface-cli download stabilityai/sv4d2.0 sv4d2_8views.safetensors --local-dir checkpointspython scripts/sampling/simple_video_sample_4d2.py --model_path checkpoints/sv4d2_8views.safetensors --input_path assets/sv4d_videos/chest.gif --output_folder outputspython3.10 -m venv .generativemodels
source .generativemodels/bin/activate
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 # check CUDA version
pip3 install -r requirements/pt2.txt
pip3 install .
pip3 install -e git+https://github.com/Stability-AI/datapipelines.git@main#egg=sdata
July 24, 2024
python -m scripts.demo.gradio_app_sv4d.QUICKSTART : python scripts/sampling/simple_video_sample_4d.py --input_path assets/sv4d_videos/test_video1.mp4 --output_folder outputs/sv4d (after downloading sv4d.safetensors and sv3d_u.safetensors from HuggingFace into checkpoints/)
To run SV4D on a single input video of 21 frames:
sv3d_u.safetensors and sv3d_p.safetensors) from here and SV4D model (sv4d.safetensors) from here to checkpoints/python scripts/sampling/simple_video_sample_4d.py --input_path <path/to/video>input_path : The input video <path/to/video> can begif or mp4 format, such as assets/sv4d_videos/test_video1.mp4, or.jpg, .jpeg, or .png format, ornum_steps : default is 20, can increase to 50 for better quality but longer sampling time.sv3d_version : To specify the SV3D model to generate reference multi-views, set --sv3d_version=sv3d_u for SV3D_u or --sv3d_version=sv3d_p for SV3D_p.elevations_deg : To generate novel-view videos at a specified elevation (default elevation is 10) using SV3D_p (default is SV3D_u), run python scripts/sampling/simple_video_sample_4d.py --input_path assets/sv4d_videos/test_video1.mp4 --sv3d_version sv3d_p --elevations_deg 30.0--remove_bg=True. To obtain higher quality outputs on real-world input videos with noisy background, try segmenting the foreground object using Clipdrop or SAM2 before running SV4D.--encoding_t=1 (of frames encoded at a time) and --decoding_t=1 (of frames decoded at a time) or lower video resolution like --img_size=512.March 18, 2024
scripts/demo/video_sampling.py and the standalone python script scripts/sampling/simple_video_sample.py for inference of both models.To run SV3D_u on a single image:
sv3d_u.safetensors from https://huggingface.co/stabilityai/sv3d to checkpoints/sv3d_u.safetensorspython scripts/sampling/simple_video_sample.py --input_path <path/to/image.png> --version sv3d_uTo run SV3D_p on a single image:
sv3d_p.safetensors from https://huggingface.co/stabilityai/sv3d to checkpoints/sv3d_p.safetensorspython scripts/sampling/simple_video_sample.py --input_path <path/to/image.png> --version sv3d_p --elevations_deg 10.0elevations_deg ([-90, 90]), and 21 azimuths (in degrees) to azimuths_deg [0, 360] in sorted order from 0 to 360. For example: python scripts/sampling/simple_video_sample.py --input_path <path/to/image.png> --version sv3d_p --elevations_deg [<list of 21 elevations in degrees>] --azimuths_deg [<list of 21 azimuths in degrees>]To run SVD or SV3D on a streamlit server:
streamlit run scripts/demo/video_sampling.py
November 28, 2023
pip install streamlit-keyup.checkpoints/ directory.streamlit run scripts/demo/turbo.py.November 21, 2023
deflickering decoder.SVD but finetuned
for 25 frame generation.python -m scripts.demo.gradio_app.scripts/demo/video_sampling.py and a standalone python script scripts/sampling/simple_video_sample.py for inference of both models.July 26, 2023
CreativeML Open RAIL++-M license (see Inference for file
hashes):SDXL-base-0.9.SDXL-refiner-0.9.July 4, 2023
June 22, 2023
SDXL-base-0.9: The base model was trained on a variety of aspect ratios on images with resolution 1024^2. The
base model uses [OpenCLIP-ViT/G](https://github.com/mlfoundation