stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: img2img quit early

Open kjlee18 opened this issue 1 year ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

When I generate images at the img2img tab, the inference step quits early. For example, if I set the inference step as 20 and denoising strength as 0.99, it works fine. However, if I set the denoising strength as 0.5, the inference ends at step 11. Even more, when the denoising strength is 0.1, it ends at step 3..

Since the webui works fine on txt2img tab, I doubt if the issue is related to denoising strength

Steps to reproduce the problem

I just git pull to the latest version. And reverting to previous version or re-install generate the same issue

What should have happened?

Generate images with specified inference steps independently with denoising strength

Commit where the problem happens

a9fed7c364061ae6efb37f797b6b522cb3cf7aa2

What platforms do you use to access the UI ?

Linux

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

To create a public link, set `share=True` in `launch()`.
100%|_______________________________________________________________________________| 20/20 [00:06<00:00,  3.25it/s]
Total progress: 100%|_______________________________________________________________| 20/20 [00:03<00:00,  5.95it/s]
100%|_______________________________________________________________________________| 16/16 [00:02<00:00,  6.44it/s]
Total progress: 100%|_______________________________________________________________| 16/16 [00:02<00:00,  5.48it/s]
100%|_______________________________________________________________________________| 20/20 [00:03<00:00,  5.87it/s]
Total progress: 100%|_______________________________________________________________| 20/20 [00:03<00:00,  5.06it/s]
100%|_______________________________________________________________________________| 11/11 [00:02<00:00,  5.37it/s]
Total progress: 100%|_______________________________________________________________| 11/11 [00:02<00:00,  4.94it/s]

Additional information

No response

kjlee18 avatar Mar 16 '23 02:03 kjlee18

is it a bug? some samplers simply do exit early when they consider image done. and you've tried to paste image of console log? just paste text itself, uploading image that shows text is a nighmare to work with.

vladmandic avatar Mar 16 '23 02:03 vladmandic

is it a bug? some samplers simply do exit early when they consider image done. and you've tried to paste image of console log? just paste text itself, uploading image that shows text is a nighmare to work with.

I changed the console log to text. As you mentioned, I tried with several samplers (Euler a, Euler, ..., DMP++2M), but the inference ends early all the time. I found a similar issue #3343, but it is an old issue..

kjlee18 avatar Mar 16 '23 04:03 kjlee18

This is a setting. You can turn it on if you want exact steps.

In Settings / Stable Diffusion / "With img2img, do exactly the amount of steps the slider specifies (normally you'd do less with less denoising)."

leppie avatar Mar 16 '23 07:03 leppie

This is a setting. You can turn it on if you want exact steps.

In Settings / Stable Diffusion / "With img2img, do exactly the amount of steps the slider specifies (normally you'd do less with less denoising)."

Thank you very much!! I spent a lot of time debugging this.. By the way, anyone knows where the code locates? (I guess if the option is not turned on, the steps will be set as [denoisint_strength * steps]

kjlee18 avatar Mar 16 '23 08:03 kjlee18

@kjlee18 it is also documented on the tooltip of label of the denoising slider: "With values below 1.0, processing will take less steps than the Sampling Steps slider specifies"

vladtepesch avatar Mar 16 '23 16:03 vladtepesch

I have also been getting this issue. on this collab. https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb#scrollTo=p4wj_txjP3TC. the issue seems to be different each time but usually after a few attempts of img to img it stops working. txt to img still works but img to img breaks in various ways. I have also gotten this error its not consistent:

ERROR: Exception in ASGI application Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/uvicorn/protocols/websockets/websockets_impl.py", line 225, in run_asgi result = await self.app(self.scope, self.asgi_receive, self.asgi_send) File "/usr/local/lib/python3.9/dist-packages/uvicorn/middleware/proxy_headers.py", line 78, in call return await self.app(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/fastapi/applications.py", line 270, in call await super().call(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/applications.py", line 124, in call await self.middleware_stack(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/errors.py", line 149, in call await self.app(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/base.py", line 24, in call await self.app(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/gzip.py", line 26, in call await self.app(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/exceptions.py", line 51, in call await self.app(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in call raise e File "/usr/local/lib/python3.9/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in call await self.app(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 680, in call await route.handle(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 334, in handle await self.app(scope, receive, send) File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 81, in app await func(session) File "/usr/local/lib/python3.9/dist-packages/fastapi/routing.py", line 283, in app await dependant.call(**values) File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 436, in join_queue session_info = await websocket.receive_json() File "/usr/local/lib/python3.9/dist-packages/starlette/websockets.py", line 133, in receive_json self._raise_on_disconnect(message) File "/usr/local/lib/python3.9/dist-packages/starlette/websockets.py", line 105, in _raise_on_disconnect raise WebSocketDisconnect(message["code"]) starlette.websockets.WebSocketDisconnect: 1006

chernobog24 avatar Mar 17 '23 02:03 chernobog24