mirror of
https://github.com/modelscope/DiffSynth-Studio.git
synced 2026-03-24 18:28:10 +00:00
update examples and downloaders
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from diffsynth import ModelManager, SDXLVideoPipeline, save_video
|
||||
from diffsynth import ModelManager, SDXLVideoPipeline, save_video, download_models
|
||||
import torch
|
||||
|
||||
|
||||
# Download models
|
||||
# Download models (automatically)
|
||||
# `models/stable_diffusion_xl/sd_xl_base_1.0.safetensors`: [link](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors)
|
||||
# `models/AnimateDiff/mm_sdxl_v10_beta.ckpt`: [link](https://huggingface.co/guoyww/animatediff/resolve/main/mm_sdxl_v10_beta.ckpt)
|
||||
|
||||
download_models(["StableDiffusionXL_v1", "AnimateDiff_xl_beta"])
|
||||
|
||||
model_manager = ModelManager(torch_dtype=torch.float16, device="cuda")
|
||||
model_manager.load_models([
|
||||
@@ -25,4 +25,4 @@ video = pipe(
|
||||
height=1024, width=1024, num_frames=16,
|
||||
num_inference_steps=100,
|
||||
)
|
||||
save_video(video, "video.mp4", fps=16)
|
||||
save_video(video, "output_video.mp4", fps=16)
|
||||
|
||||
Reference in New Issue
Block a user