Skip to content

AlexanderCGO2/stable-diffusion-infinite-zoom

 
 

Repository files navigation

Stable Diffusion Infinite Zoom

Run it on Replicate:

This repo is based on Stable Diffusion by CompVis group: and Stable Inpainting by Runway

The idea is based on this tweet by Matt Henderson

Model description

Given a prompt I run txt2img,py with stable-diffusion-v1-5 Then I paste a downscaled version of the image into it's center and inpaint around the center using inpaint.py using this sd-v1-5-inpainting.ckpt from I repeat the inpainting step twice.

Then zoom in by upscaling the image and cuting it to the original size while pasting the "center" image in its due area.

How to run

Download text-2-image and inpainting weights

hf_hub_download(repo_id="runwayml/stable-diffusion-v1-5", filename="v1-5-pruned-emaonly.ckpt", cache_dir=".", use_auth_token=) hf_hub_download(repo_id="runwayml/stable-diffusion-inpainting", filename="sd-v1-5-inpainting.ckpt", cache_dir=".", use_auth_token=)

create video

python3 scripts/inf_zoom.py <your prompt>

Credits

@misc{rombach2021highresolution,
      title={High-Resolution Image Synthesis with Latent Diffusion Models}, 
      author={Robin Rombach and Andreas Blattmann and Dominik Lorenz and Patrick Esser and Björn Ommer},
      year={2021},
      eprint={2112.10752},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

About

Use Runway's Stable-diffusion inpainting model to create an infinite loop video. Inspired by https://twitter.com/matthen2/status/1564608773485895692

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 89.6%
  • Python 10.3%
  • Shell 0.1%