You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2024. It is now read-only.
<imgsrc="../Assets/Samples/624461087_22_8_LMSScheduler.png"width="256"alt="Image of browser inferencing on sample images."/> | <imgsrc="../Assets/Samples/624461087_22_8_EulerAncestralScheduler.png"width="256"alt="Image of browser inferencing on sample images."/> |<imgsrc="../Assets/Samples/624461087_22_8_DDPMScheduler.png"width="256"alt="Image of browser inferencing on sample images."/> |
Text To Image Stable Diffusion is a powerful machine learning technique that allows you to generate high-quality images from textual descriptions. It combines the capabilities of text understanding and image synthesis to convert natural language descriptions into visually coherent and meaningful images
262
+
263
+
| Input Text | Output Image | Diffusion Steps |
264
+
| :--- | :--- | :--- |
265
+
<imgsrc="../Assets/Samples/Text2Img_Start.png"width="256"alt="Image of browser inferencing on sample images."/> | <imgsrc="../Assets/Samples/Text2Img_End.png"width="256"alt="Image of browser inferencing on sample images."/> |<imgsrc="../Assets/Samples/Text2Img_Animation.webp"width="256"alt="Image of browser inferencing on sample images."/> |
266
+
267
+
### **Image To Image**
268
+
Image To Image Stable Diffusion is an advanced image processing and generation method that excels in transforming one image into another while preserving the visual quality and structure of the original content. Using stable diffusion, this technique can perform a wide range of image-to-image tasks, such as style transfer, super-resolution, colorization, and more
269
+
270
+
| Input Image | Output Image | Diffusion Steps |
271
+
| :--- | :--- | :--- |
272
+
<imgsrc="../Assets/Samples/Img2Img_Start.bmp"width="256"alt="Image of browser inferencing on sample images."/> | <imgsrc="../Assets/Samples/Img2Img_End.png"width="256"alt="Image of browser inferencing on sample images."/> |<imgsrc="../../Assets/Samples/Img2Img_Animation.webp"width="256"alt="Image of browser inferencing on sample images."/> |
273
+
274
+
```
275
+
Prompt: Dog wearing storm trooper helmet, head shot
276
+
```
277
+
278
+
### **Image Inpainting**
279
+
Image inpainting is an image modification/restoration technique that intelligently fills in missing or damaged portions of an image while maintaining visual consistency. It's used for tasks like photo restoration and object removal, creating seamless and convincing results.
280
+
281
+
In the below example we use a simple mask image + prompt to add a rider to the horse
282
+
The black part of the mask will be used buy the process to generate new content, in this case the rider
<imgsrc="../Assets/Samples/Inpaint-Original.png"width="256"alt="Image of browser inferencing on sample images."/> | <imgsrc="../Assets/Samples/Inpaint-Mask.png"width="256"alt="Image of browser inferencing on sample images."/> |<imgsrc="../Assets/Samples/Inpaint-MaskedImage.PNG"width="256"alt="Image of browser inferencing on sample images."/> |<imgsrc="../Assets/Samples/Inpaint-Result.png"width="256"alt="Image of browser inferencing on sample images."/> |
287
+
288
+
```
289
+
Prompt: Rider on horse
290
+
```
291
+
292
+
293
+
## **Realtime Stable Diffusion**
294
+
Realtime stable diffusion is a process where the results are constantly rendered as you are working with the image or changing the settings, This can be fantastic if you are creating new artworks or editing existing images.
295
+
296
+
Performance will depend on hardware and models selected, but for `Latent Consistency Models` you can get up to 4fps with a 3090 :)
Once you have selected a model version repo, click `Files and Versions`, then select the `ONNX` branch. If there isn't an ONNX model branch available, use the `main` branch and convert it to ONNX. See the [ONNX conversion tutorial for PyTorch](https://learn.microsoft.com/windows/ai/windows-ml/tutorials/pytorch-convert-model) for more information.
-[Hugging Face Stable Diffusion Blog](https://huggingface.co/blog/stable_diffusion)
334
+
-[ONNX Runtime tutorial for Stable Diffusion in C#](https://onnxruntime.ai/docs/tutorials/csharp/stable-diffusion-csharp.html)
335
+
336
+
337
+
## Reference
338
+
This work is based on the original C# implementation of Stable Diffusion by Cassie Breviu here: [Stable Diffusion with C# and ONNX Runtime](https://github.com/cassiebreviu/stablediffusion).
0 commit comments