Instructions to use OFA-Sys/small-stable-diffusion-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use OFA-Sys/small-stable-diffusion-v0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("OFA-Sys/small-stable-diffusion-v0", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,7 +15,9 @@ pipeline_tag: text-to-image
|
|
| 15 |
|
| 16 |
# Small Stable Diffusion Model Card
|
| 17 |
【Update 2023/02/07】 Recently, we have released [a diffusion deployment repo](https://github.com/OFA-Sys/diffusion-deploy) to speedup the inference on both GPU (\~4x speedup, based on TensorRT) and CPU (\~12x speedup, based on IntelOpenVINO).
|
| 18 |
-
Integrated with this repo, small-stable-diffusion could generate images in just **5 seconds on the CPU**.
|
|
|
|
|
|
|
| 19 |
|
| 20 |
Similar image generation quality, but is nearly 1/2 smaller!
|
| 21 |
Here are some samples:
|
|
@@ -26,7 +28,8 @@ Here are some samples:
|
|
| 26 |
|
| 27 |
We support a [Gradio](https://github.com/gradio-app/gradio) Web UI to run small-stable-diffusion-v0:
|
| 28 |
[](https://huggingface.co/spaces/akhaliq/small-stable-diffusion-v0)
|
| 29 |
-
|
|
|
|
| 30 |
## Example
|
| 31 |
|
| 32 |
*Use `Diffusers` >=0.8.0, do not support lower versions.*
|
|
|
|
| 15 |
|
| 16 |
# Small Stable Diffusion Model Card
|
| 17 |
【Update 2023/02/07】 Recently, we have released [a diffusion deployment repo](https://github.com/OFA-Sys/diffusion-deploy) to speedup the inference on both GPU (\~4x speedup, based on TensorRT) and CPU (\~12x speedup, based on IntelOpenVINO).
|
| 18 |
+
Integrated with this repo, small-stable-diffusion could generate images in just **5 seconds on the CPU**\*.
|
| 19 |
+
|
| 20 |
+
*\* Test on Intel(R) Xeon(R) Platinum 8369B CPU, DPMSolverMultistepScheduler 10 steps, fix channel/height/width when converting to Onnx*
|
| 21 |
|
| 22 |
Similar image generation quality, but is nearly 1/2 smaller!
|
| 23 |
Here are some samples:
|
|
|
|
| 28 |
|
| 29 |
We support a [Gradio](https://github.com/gradio-app/gradio) Web UI to run small-stable-diffusion-v0:
|
| 30 |
[](https://huggingface.co/spaces/akhaliq/small-stable-diffusion-v0)
|
| 31 |
+
We also provide a space demo for [`small-stable-diffusion-v0 + diffusion-deploy`](https://huggingface.co/spaces/OFA-Sys/FAST-CPU-small-stable-diffusion-v0).
|
| 32 |
+
*As huggingface provides AMD CPU for the space demo, it costs about 35 seconds to generate an image with 15 steps, which is much slower than the Intel CPU environment as diffusion-deploy is based on Intel's OpenVINO.*
|
| 33 |
## Example
|
| 34 |
|
| 35 |
*Use `Diffusers` >=0.8.0, do not support lower versions.*
|