nateraw / stable-diffusion-videos

Create 🔥 videos with Stable Diffusion by exploring the latent space and morphing between text prompts
Apache License 2.0
4.4k stars 421 forks source link

{enhancement} Option to load local checkpoint file #57

Closed cibernicola closed 1 year ago

cibernicola commented 1 year ago

It would be wonderful to have the option to load the checkpoint file locally.

nateraw commented 1 year ago

Do you mean a local stable diffusion checkpoint? If that's the case, I think it goes along with #28 and/or #25 . I think we should try and prioritize this issue soon.

nateraw commented 1 year ago

This is now resolved. You can load whatever checkpoint you like, replacing the "CompVis/stable-diffusion-v1-4" in the readme snippets with your model ID. For example, to load Waifu Diffusion, you would do:


from stable_diffusion_videos import StableDiffusionWalkPipeline
from diffusers.schedulers import LMSDiscreteScheduler
import torch

pipeline = StableDiffusionWalkPipeline.from_pretrained(
    "hakurei/waifu-diffusion",
    use_auth_token=True,
    torch_dtype=torch.float16,
    revision="fp16",
    scheduler=LMSDiscreteScheduler(
        beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear"
    )
).to("cuda")