AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: 1.6 inpainting not working #13040

Closed That-Elf closed 1 year ago

That-Elf commented 1 year ago

Is there an existing issue for this?

What happened?

Can't inpaint, when I try everything freezes and it gives me the error below: line 170, in preprocess return [value for _, value in self.choices].index(x) ValueError: ['original', 'original'] is not in list For some reason since the update the texts in the inpaint tabe have doubled up here's a picture showing that: image as seen in the image all the text boxes have doubled up names which I assume is what is causing the problem. I asked a friend and they weren't having this problem so I'm not sure why it happened.

Steps to reproduce the problem

  1. Go to img 2 img then the inpainting tab
  2. Press the original option (in my case the text is doubled up like this: "original, original")
  3. Inpaint image like normal
  4. Generate like normal

What should have happened?

It generates an image with the inpainted area looking different than the input image depending on the given prompt instead of halting.

Sysinfo

sysinfo-2023-09-03-23-48.txt

What browsers do you use to access the UI ?

Google Chrome, Other

Console logs

C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui>git pull
Already up to date.

C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui>pause
Press any key to continue . . .
venv "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Launching Web UI with arguments: --xformers
Additional Network extension not installed, Only hijack built-in lora
LoCon Extension hijack built-in lora successfully
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
2023-09-04 02:48:37,573 - ControlNet - INFO - ControlNet v1.1.234
ControlNet preprocessor location: C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\downloads
2023-09-04 02:48:37,658 - ControlNet - INFO - ControlNet v1.1.234
Loading weights [48e194607f] from C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\models\Stable-diffusion\aniverse_V12Pruned.safetensors
C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet_ui\controlnet_ui_group.py:165: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  with gr.Row(elem_classes=["cnet-image-row"]).style(equal_height=True):
C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet_ui\controlnet_ui_group.py:179: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  self.generated_image = gr.Image(
C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\metadata_editor.py:399: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  with gr.Row().style(equal_height=False):
C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\metadata_editor.py:521: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  cover_image = gr.Image(
Running on local URL:  http://127.0.0.1:7860
Creating model from config: C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\configs\v1-inference.yaml

To create a public link, set `share=True` in `launch()`.
Startup time: 10.3s (prepare environment: 3.5s, import torch: 2.6s, import gradio: 0.6s, setup paths: 0.6s, initialize shared: 0.2s, other imports: 0.5s, load scripts: 1.4s, create ui: 0.4s, gradio launch: 0.4s).
Loading VAE weights specified in settings: C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\models\VAE\pastel-waifu-diffusion.vae.pt
Applying attention optimization: xformers... done.
Traceback (most recent call last):
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\modules\ui_extra_networks.py", line 392, in pages_html
    return refresh()
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\modules\ui_extra_networks.py", line 400, in refresh
    ui.pages_contents = [pg.create_html(ui.tabname) for pg in ui.stored_extra_pages]
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\modules\ui_extra_networks.py", line 400, in <listcomp>
    ui.pages_contents = [pg.create_html(ui.tabname) for pg in ui.stored_extra_pages]
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\modules\ui_extra_networks.py", line 162, in create_html
    self.items = {x["name"]: x for x in self.list_items()}
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\modules\ui_extra_networks.py", line 162, in <dictcomp>
    self.items = {x["name"]: x for x in self.list_items()}
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\extensions-builtin\Lora\ui_extra_networks_lora.py", line 69, in list_items
    for index, name in enumerate(networks.available_networks):
RuntimeError: dictionary changed size during iteration
Model loaded in 4.7s (load weights from disk: 0.7s, create model: 0.3s, apply weights to model: 1.4s, load VAE: 1.3s, calculate empty prompt: 0.9s).
Traceback (most recent call last):
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1429, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 1239, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "C:\Users\MSI\Desktop\MainAIRepo\SD\stable-diffusion-webui\venv\lib\site-packages\gradio\components\radio.py", line 170, in preprocess
    return [value for _, value in self.choices].index(x)
ValueError: ['original', 'original'] is not in list

Additional information

For context I am running Windows 11 and I am using an NVIDIA GeForce 3070 Ti with 24 GB of GPU memory with 8GB of dedicated GPU memory as well as an 11th gen Intel i9 I mainly use OperaGX as my browser but the same problem persists in Google Chrome too.

That-Elf commented 1 year ago

Okay so I'm pretty sure I found the problem! In my case it was due to an extension I had, I'm not sure which exact one but I'm pretty sure it was caused by one called canvas zoom which is supposed to help the user make the canvas larger. I uninstalled and reinstalled everything again and before I added the extensions everything worked then after the extensions were added it broke again, so I tried adding the ones I thought would work and they all did, I don't want to uninstall and reinstall everything all over again but I'm pretty sure the problem is with the canvas zoom extension.

catboxanon commented 1 year ago

Duplicate of https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12886