Merge pull request #239 from cmdr2/main

Merge main
This commit is contained in:
cmdr2 2022-09-24 22:51:06 +05:30 committed by GitHub
commit 3490d0d743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<a href="#installation"><img src="https://github.com/cmdr2/stable-diffusion-ui/raw/develop/media/download-linux.png" width="200" /></a>
</p>
[![Discord Server](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.com/invite/u9yhsFmEkB) (for support, and development discussion) | [Troubleshooting guide for common problems](Troubleshooting.md)
[![Discord Server](https://img.shields.io/discord/1014774730907209781?label=Discord)](https://discord.com/invite/u9yhsFmEkB) (for support, and development discussion) | [Troubleshooting guide for common problems](Troubleshooting.md)
️‍🔥🎉 **New!** Live Preview, More Samplers, In-Painting, Face Correction (GFPGAN) and Upscaling (RealESRGAN) have been added!
@ -20,7 +20,7 @@ This distribution currently uses Stable Diffusion 1.4. Once the model for 1.5 be
- **Lots of Samplers:** ddim, plms, heun, euler, euler_a, dpm2, dpm2_a, lms
- **Image Modifiers**: A library of *modifier tags* like *"Realistic"*, *"Pencil Sketch"*, *"ArtStation"* etc. Experiment with various styles quickly.
- **New UI**: with cleaner design
- **Waifu Model Supported**: Just replace the `stable-diffusion\sd-v1-4.ckpt` file after installation with the Waifu model
- **Waifu Model Support**: Just replace the `stable-diffusion\sd-v1-4.ckpt` file after installation with the Waifu model
- Supports "*Text to Image*" and "*Image to Image*"
- **NSFW Setting**: A setting in the UI to control *NSFW content*
- **Use CPU setting**: If you don't have a compatible graphics card, but still want to run it on your CPU.
@ -35,7 +35,7 @@ This distribution currently uses Stable Diffusion 1.4. Once the model for 1.5 be
# System Requirements
1. Windows 10/11, or Linux. Experimental support for Mac is coming soon.
2. An NVIDIA graphics card, preferably with 6GB or more of VRAM. But if you don't have a compatible graphics card, you can still use it with a "Use CPU" setting. It'll be very slow, but it should still work.
2. An NVIDIA graphics card, preferably with 4GB or more of VRAM. But if you don't have a compatible graphics card, you can still use it with a "Use CPU" setting. It'll be very slow, but it should still work.
You do not need anything else. You do not need WSL, Docker or Conda. The installer will take care of it.

View File

@ -214,7 +214,7 @@
</div>
</body>
<script src="media/main.js?v=3"></script>
<script src="media/main.js?v=4"></script>
<script>
async function init() {
await loadModifiers()

View File

@ -366,6 +366,20 @@ async function doMakeImage(reqBody, batchCount) {
res = undefined
progressBar.style.display = 'none'
} else {
if (finalJSON !== undefined && finalJSON.indexOf('}{') !== -1) {
// hack for a middleman buffering all the streaming updates, and unleashing them
// on the poor browser in one shot.
// this results in having to parse JSON like {"step": 1}{"step": 2}...{"status": "succeeded"..}
// which is obviously invalid.
// So we need to just extract the last {} section, starting from "status" to the end of the response
let lastChunkIdx = finalJSON.lastIndexOf('}{')
if (lastChunkIdx !== -1) {
let remaining = finalJSON.substring(lastChunkIdx)
finalJSON = remaining.substring(1)
}
}
res = JSON.parse(finalJSON)
progressBar.style.display = 'none'