https://github.com/keturn/sd-progress-demo
cheap views of intermediate Stable Diffusion results
https://github.com/keturn/sd-progress-demo
diffusers gradio jupyter-notebook stable-diffusion stable-diffusion-diffusers
Last synced: 12 months ago
JSON representation
cheap views of intermediate Stable Diffusion results
- Host: GitHub
- URL: https://github.com/keturn/sd-progress-demo
- Owner: keturn
- Created: 2022-09-18T17:45:09.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-22T16:22:02.000Z (over 3 years ago)
- Last Synced: 2025-05-13T01:14:43.574Z (12 months ago)
- Topics: diffusers, gradio, jupyter-notebook, stable-diffusion, stable-diffusion-diffusers
- Language: Python
- Homepage: https://discuss.huggingface.co/t/decoding-latents-to-rgb-without-upscaling/23204/2?u=keturn
- Size: 55.7 KB
- Stars: 45
- Watchers: 5
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
title: Diffusers Preview Demo
emoji: 📉
colorFrom: blue
colorTo: blue
sdk: gradio
sdk_version: 3.3.1
app_file: app.py
pinned: false
---
Here we demonstrate how to do preview images of a Stable Diffusion's intermediate stages using a [fast approximation][approximation] to visualize the low-resolution (64px) latent state.
+ **[app.py](app.py)** is a Gradio application that yields preview images from a [generator function][gradio.iter] while the pipeline is in progress. The UI is directly derived from Stability AI's [Stable Diffusion Demo](https://huggingface.co/spaces/stabilityai/stable-diffusion).
+ **[progress_ipywidgets_demo.ipynb](progress_ipywidgets_demo.ipynb)** demonstrates using the same pipeline to update [Jupyter widgets][ipywidgets] in a notebook.
+ [`preview_decoder.py`](preview_decoder.py) has the fast latent-to-RGB decoder function.
+ [`generator_pipeline.py`](generator_pipeline.py) provides a DiffusionPipeline with a `generate()` method to yield the latent data at each step. It is nearly a strict refactoring of the [StableDiffusionPipeline][sdpipeline] in 🧨diffusers 0.3.
[approximation]: https://discuss.huggingface.co/t/decoding-latents-to-rgb-without-upscaling/23204/2?u=keturn "Decoding latents to RGB without upscaling"
[ipywidgets]: https://ipywidgets.readthedocs.io/en/stable/
[gradio.iter]: https://gradio.app/key_features/#iterative-outputs
[sdpipeline]: https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py