zero01101 / openOutpaint-webUI-extension

direct A1111 webUI extension for openOutpaint
MIT License
396 stars 22 forks source link

[Bug]: img2img and dream just wont work for me on the automatic1111 extension #47

Closed mastachef closed 1 year ago

mastachef commented 1 year ago

Is ths issue about the extension?

What happened?

Running on google colab https://github.com/TheLastBen/fast-stable-diffusion

https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

Using ngrok

Running on local URL: https://.ngrok.io/ ✔ Connected Startup time: 440.2s (import torch: 10.2s, import gradio: 1.3s, import ldm: 1.8s, other imports: 38.2s, list SD models: 12.3s, setup codeformer: 8.0s, list builtin upscalers: 0.9s, load scripts: 62.6s, load SD checkpoint: 92.7s, create ui: 209.9s, gradio launch: 0.3s, scripts app_started_callback: 1.9s). API error: POST: https://.ngrok.io/sdapi/v1/txt2img {'error': 'RuntimeError', 'detail': '', 'body': '', 'errors': "There is no current event loop in thread 'AnyIO worker thread'."} ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/local/lib/python3.9/dist-packages/anyio/streams/memory.py:94 in receive │ │ │ │ /usr/local/lib/python3.9/dist-packages/anyio/streams/memory.py:89 in │ │ receive_nowait │ ╰──────────────────────────────────────────────────────────────────────────────╯ WouldBlock

During handling of the above exception, another exception occurred:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/local/lib/python3.9/dist-packages/starlette/middleware/base.py:43 in │ │ call_next │ │ │ │ /usr/local/lib/python3.9/dist-packages/anyio/streams/memory.py:114 in │ │ receive │ ╰──────────────────────────────────────────────────────────────────────────────╯ EndOfStream

During handling of the above exception, another exception occurred:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/api/api.py:145 in │ │ exception_handling │ │ │ │ 144 │ │ try: │ │ ❱ 145 │ │ │ return await call_next(request) │ │ 146 │ │ except Exception as e: │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ call_next = <function │ │ │ │ BaseHTTPMiddleware.call..call_next at │ │ │ │ 0x7f0297b2bca0> │ │ │ │ e = RuntimeError("There is no current event loop in │ │ │ │ thread 'AnyIO worker thread'.") │ │ │ │ handle_exception = <function api_middleware..handle_exception at │ │ │ │ 0x7f0456063790> │ │ │ │ request = <starlette.requests.Request object at 0x7f045606cc70> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.9/dist-packages/starlette/middleware/base.py:46 in │ │ call_next │ │ │ │ ... 25 frames hidden ... │ │ │ │ /usr/lib/python3.9/asyncio/locks.py:81 in init │ │ │ │ 80 │ │ if loop is None: │ │ ❱ 81 │ │ │ self._loop = events.get_event_loop() │ │ 82 │ │ else: │ │ │ │ ╭──────────────────────────── locals ─────────────────────────────╮ │ │ │ loop = None │ │ │ │ self = <asyncio.locks.Lock object at 0x7f02978581f0 [unlocked]> │ │ │ ╰─────────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/lib/python3.9/asyncio/events.py:642 in get_event_loop │ │ │ │ 641 │ │ if self._local._loop is None: │ │ ❱ 642 │ │ │ raise RuntimeError('There is no current event loop in thre │ │ 643 │ │ │ │ │ │ │ % threading.current_thread().name) │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at │ │ │ │ 0x7f047caba640> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ RuntimeError: There is no current event loop in thread 'AnyIO worker thread'. API error: POST: https://62a1-34-86-84-53.ngrok.io/sdapi/v1/txt2img {'error': 'RuntimeError', 'detail': '', 'body': '', 'errors': "There is no current event loop in thread 'AnyIO worker thread'."} ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/local/lib/python3.9/dist-packages/anyio/streams/memory.py:94 in receive │ │ │ │ /usr/local/lib/python3.9/dist-packages/anyio/streams/memory.py:89 in │ │ receive_nowait │ ╰──────────────────────────────────────────────────────────────────────────────╯ WouldBlock

During handling of the above exception, another exception occurred:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /usr/local/lib/python3.9/dist-packages/starlette/middleware/base.py:43 in │ │ call_next │ │ │ │ /usr/local/lib/python3.9/dist-packages/anyio/streams/memory.py:114 in │ │ receive │ ╰──────────────────────────────────────────────────────────────────────────────╯ EndOfStream

During handling of the above exception, another exception occurred:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/api/api.py:145 in │ │ exception_handling │ │ │ │ 144 │ │ try: │ │ ❱ 145 │ │ │ return await call_next(request) │ │ 146 │ │ except Exception as e: │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ call_next = <function │ │ │ │ BaseHTTPMiddleware.call..call_next at │ │ │ │ 0x7f04560e3940> │ │ │ │ e = RuntimeError("There is no current event loop in │ │ │ │ thread 'AnyIO worker thread'.") │ │ │ │ handle_exception = <function api_middleware..handle_exception at │ │ │ │ 0x7f0456063790> │ │ │ │ request = <starlette.requests.Request object at 0x7f0335663c40> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/local/lib/python3.9/dist-packages/starlette/middleware/base.py:46 in │ │ call_next │ │ │ │ ... 25 frames hidden ... │ │ │ │ /usr/lib/python3.9/asyncio/locks.py:81 in init │ │ │ │ 80 │ │ if loop is None: │ │ ❱ 81 │ │ │ self._loop = events.get_event_loop() │ │ 82 │ │ else: │ │ │ │ ╭──────────────────────────── locals ─────────────────────────────╮ │ │ │ loop = None │ │ │ │ self = <asyncio.locks.Lock object at 0x7f02979eb550 [unlocked]> │ │ │ ╰─────────────────────────────────────────────────────────────────╯ │ │ │ │ /usr/lib/python3.9/asyncio/events.py:642 in get_event_loop │ │ │ │ 641 │ │ if self._local._loop is None: │ │ ❱ 642 │ │ │ raise RuntimeError('There is no current event loop in thre │ │ 643 │ │ │ │ │ │ │ % threading.current_thread().name) │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at │ │ │ │ 0x7f047caba640> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ RuntimeError: There is no current event loop in thread 'AnyIO worker thread'.

I dont know why this is happening and I would really like to get it working but I dont understand whats occuring.

Steps to reproduce the problem

  1. Go to .... https://colab.research.google.com/drive/1nH5MsMKS0v_pGKkYTrOJ-2bKbfoU583Z?authuser=1#scrollTo=PjzwxTkPSPHf
  2. Press .... install openoutpaint
  3. ... attempt to use

What should have happened?

work properly

Commit where the problem happens

https://github.com/zero01101/openOutpaint/commit/5fb01c901f36cb911299ce5bca2cdd6accbeed95

What platforms do you use to access openOutpaint?

Windows

What browsers do you use to access the UI ?

Microsoft Edge

Browser Extensions/Addons

.ipynb_checkpoints
StylePile https://github.com/some9000/StylePile.git abc71631 (Thu Dec 8 06:48:39 2022) unknown canvas-zoom https://github.com/richrobber2/canvas-zoom.git 0c62abce (Sun Apr 2 21:22:25 2023) unknown mine-diffusion https://github.com/fropych/mine-diffusion.git 039062f0 (Fri Mar 31 14:38:41 2023) unknown novelai-2-local-prompt https://github.com/animerl/novelai-2-local-prompt.git 0e03ca1a (Sat Jan 28 06:33:03 2023) unknown openOutpaint-webUI-extension https://github.com/zero01101/openOutpaint-webUI-extension.git 566a8a53 (Thu Mar 30 22:50:34 2023) unknown openpose-editor https://github.com/fkunn1326/openpose-editor.git a63fefc3 (Thu Mar 30 08:11:41 2023) unknown posex https://github.com/hnmr293/posex.git 61169d30 (Sat Apr 1 12:28:38 2023) unknown sd-webui-controlnet https://github.com/Mikubill/sd-webui-controlnet.git 241c05f8 (Thu Mar 23 15:18:35 2023) unknown sd-webui-depth-lib https://github.com/jexom/sd-webui-depth-lib 28a22387 (Mon Mar 6 21:02:28 2023) unknown sd-webui-llul https://github.com/hnmr293/sd-webui-llul.git 9123f098 (Sat Apr 1 12:52:42 2023) unknown sd-webui-supermerger https://github.com/hako-mikan/sd-webui-supermerger.git e65bd7b0 (Wed Apr 5 03:34:14 2023) unknown stable-diffusion-webui-images-browser https://github.com/AlUlkesh/stable-diffusion-webui-images-browser.git 766b6bd4 (Mon Apr 3 19:43:07 2023) unknown stable-diffusion-webui-pixelization https://github.com/AUTOMATIC1111/stable-diffusion-webui-pixelization.git e37251c5 (Sat Feb 4 17:02:01 2023) unknown stable-diffusion-webui-two-shot https://github.com/opparco/stable-diffusion-webui-two-shot.git 9936c52e (Sun Feb 19 08:40:41 2023) unknown ultimate-upscale-for-automatic1111 https://github.com/Coyote-A/ultimate-upscale-for-automatic1111.git 0a3d03a4 (Tue Feb 7 06:07:23 2023) unknown LDSR built-in
Lora built-in
ScuNET built-in
SwinIR built-in
prompt-bracket-checker built-in

AUTOMATIC1111 webUI Commandline Arguments

!python /content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py $share --api --disable-safe-unpickle --enable-insecure-extension-access --no-download-sd-model --no-half-vae  --ckpt-dir "$model" --xformers $auth --disable-console-progressbars

Additional information

No response

zero01101 commented 1 year ago

hi, this is an issue with webUI - please see https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/9046 and https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/9319

closing as duplicate of https://github.com/zero01101/openOutpaint-webUI-extension/issues/46