Code Monkey home page Code Monkey logo

stable-diffusion-infinite-zoom's Introduction

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}
}

stable-diffusion-infinite-zoom's People

Contributors

apolinario avatar ariel415el avatar cpacker avatar owenvincent avatar patrickvonplaten avatar pesser avatar rromb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.