AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.47k stars 26.73k forks source link

WebUI not updating image when on remote pc in with --listen enabled when processing over 30 seconds #1318

Open mattdrum opened 2 years ago

mattdrum commented 2 years ago

I am using the webui in a browser on another pc on my lan with the --listen parameter. The webite works well as long as the processing time does not exceed 30 seconds. I have tested this by both increasing steps and by increasing the batch count. Once you submit a job that exceeds 30 seconds, as soon as it completes the GENERATE button goes orange again and no longer functions. The web page has to be re-loaded for it to work again.

49RpK5dY commented 2 years ago

Are you by any chance on a weak wi-fi or opening a webui on another machine or in another tab at the same time?

mattdrum commented 2 years ago

No I have a 1 gig copper connection. Also made sure I closed all other tabs.

On Thu, Sep 29, 2022 at 4:16 PM 49RpK5dY @.***> wrote:

Are you by any chance on a weak wi-fi or opening a webui on another machine on in another tab at the same time?

— Reply to this email directly, view it on GitHub https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/1318#issuecomment-1262766273, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANTNUSRZZGADBEXC6LC7TMTWAX2KNANCNFSM6AAAAAAQZBXZ3Y . You are receiving this because you authored the thread.Message ID: @.***>

49RpK5dY commented 2 years ago

Have you tried any other device like phone? I'm accessing a webui from an older android phone, it's a bit laggy but works fine unless the connection is lost. Maybe the problem is on your PC. Could also be something with the browser if there's a hard 30 sec cutoff.

C43H66N12O12S2 commented 2 years ago

@mattdrum Could you test inserting demo.queue() just before demo.launch() in webui.py and see if it helps?

d8ahazard commented 2 years ago

@mattdrum Could you test inserting demo.queue() just before demo.launch() in webui.py and see if it helps?

I can confirm that this does not work from a remote machine, and adding demo.queue() does not help.

It seems like, when running locally and you generate, the web UI is sending POST messages to /predict and retrieving the current status, as well as updating the preview image.

When running remote, this call never happens, and all we see is the final output image.

d8ahazard commented 2 years ago

More specifically, it's looking like it's getting hung up trying to connect to the websocket...

hunter-xue commented 1 year ago

the same issue, and can only use SSH to redirect remote IP address to localhost as work around. I guest, some security policy of browsers blocked something (websocket?) of webui.