leszekhanusz / diffusion-ui

Frontend for deeplearning Image generation
https://diffusionui.readthedocs.io
MIT License
144 stars 11 forks source link

A1111 Image generates and then vanishes when complete #75

Closed MrKuenning closed 2 years ago

MrKuenning commented 2 years ago

First of all thanks, I use your site as a great safe front end for the rest of my family to generate images quickly without the risk of screwing up the config. Lots of joy and laughter from my children as they generate images of Totoro going down a water slide.

All that aside, I started having two issues lately, one is Gradio Auth. I have my SD published with SSL through a reverse proxy, but due to recent exploits, I enabled a username and password to limit my attack vector. However, when I do, DiffusionUI.com says it can not find any API. I assume auth is not currently supported.

The second issue I started having is when I do connect to my back end it will generate an image and when it completes it vanishes. 2022-10-22 12_00_11-Window

I disable auth and diffusion connects happily to my back end. It will see all of the models in the drop-down and generate no errors. I enter a prompt or use a bouquet of roses, I can see the image building, and when it finishes I get an empty image placeholder. Like it can't find it. The image is successfully created and saved in my output folder. I figured it was broken because of all the changes to image history in the A1111 repo, but I am glad to hear it should be working.

I am experiencing this issue regardless of browser or OS. Tested are win 10 and 11 on chrome and firefox

Current A111 version: Commit hash: 48dbf99e84045ee7af55bc5b1b86492a240e631e Console output is just successful image creation Output directory for txt2img images: outputs/txt2img Output directory for img2img images: outputs/img2img

leszekhanusz commented 2 years ago

Regarding the gradio auth, it is not possible to use it right now because of a limitation in gradio

Regarding your issue, I tried it on Chrome and Firefox with the commit you provided and unfortunately it works fine for me...

Could you please:

In my case, I have:

Navigated to https://diffusionui.com/
index.a676fb65.js:458 Computing inputs
index.a676fb65.js:458 Downloading gradio config from http://127.0.0.1:7860/config
index.a676fb65.js:458 gradio_config {version: '3.4b3\n', mode: 'blocks', dev_mode: false, components: Array(888), theme: 'default', …}
index.a676fb65.js:458 Computing inputs
index.a676fb65.js:660 InputCanvas onMounted
index.a676fb65.js:458 Init canvas!
index.a676fb65.js:458 Adding brush_outline to canvas.
index.a676fb65.js:458 Current model: model.ckpt [ec706de4]
index.a676fb65.js:458 input_data {prompt: 'Bouquet of roses', reverse_prompt: '', style_1: 'None', style_2: 'None', nb_steps: 20, …}
index.a676fb65.js:458 output metadata {prompt: 'Bouquet of roses', all_prompts: Array(1), negative_prompt: '', seed: 156052360, all_seeds: Array(1), …}
leszekhanusz commented 2 years ago

It could also be a A1111 configuration problem. Do not show any images in results for web should NOT be checked.

Other things which could be useful:

MrKuenning commented 2 years ago

Stable Diffusion.pdf

Start.bat

@echo off
set COMMANDLINE_ARGS= --listen --deepdanbooru --port 7799 --gradio-auth ****:****
git pull
call webui.bat

Only I run without the Auth when I want to use diffusionui.com

leszekhanusz commented 2 years ago

Please confirm that you tried the suggestions in my comment above and send me the output of the web console.

MrKuenning commented 2 years ago

Tried chrome and Edge in incognito settings reset. Also tried using both my web address as well as my localhost address

Web Console

Computing inputs
index.a676fb65.js:458 Downloading gradio config from http://127.0.0.1:7799/config
index.a676fb65.js:458 gradio_config {version: '3.5\n', mode: 'blocks', dev_mode: false, components: Array(933), theme: 'default', …}
index.a676fb65.js:458 Computing inputs
index.a676fb65.js:660 InputCanvas onMounted
index.a676fb65.js:458 Init canvas!
index.a676fb65.js:458 Adding brush_outline to canvas.
index.a676fb65.js:458 Current model: sd-v1-5-pruned-emaonly.ckpt [81761151]
index.a676fb65.js:458 input_data {prompt: 'Bouquet of roses', reverse_prompt: '', style_1: 'None', style_2: 'None', nb_steps: 40, …}
index.a676fb65.js:458 output metadata {prompt: 'Bouquet of roses', all_prompts: Array(1), negative_prompt: '', seed: 3263713825, all_seeds: Array(1), …}

SD Console

100%|██████████████████████████████████████████████████████████████████████████████████| 40/40 [00:06<00:00,  6.47it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 40/40 [00:04<00:00,  9.74it/s]

Image generates to 99% then disappears. It's like it cant figure out the output dir.

leszekhanusz commented 2 years ago

Alright I found the culprit, if I upgrade gradio to 3.5 I have the same problem as you. As a workaround, you should be able to make it work by downgrading gradio for now with: pip install gradio==3.4b3

leszekhanusz commented 2 years ago

It should now be fixed by #76 Thanks a lot for your helpful feedback!

leszekhanusz commented 2 years ago

I just noticed that now editing generated images does not work anymore with images generated this way... Closing this issue in favor of the new issue #77

MrKuenning commented 2 years ago

It works now. Thanks!