AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: img2img upscaling: "AssertionError: could not find upscaler named []" #8576

Open sunilw opened 1 year ago

sunilw commented 1 year ago

Is there an existing issue for this?

What happened?

In the img2img tab, if the width/height sliders are set to increase the dimensions of the image, hitting the 'generate' button returns no image.

Within the ui I can see the message: AssertionError: could not find upscaler named []

In the terminal I can see this:

IndexError: list index out of range
Traceback (most recent call last):
  File "/home/mantis/opt/stable2/venv/lib/python3.9/site-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/mantis/opt/stable2/venv/lib/python3.9/site-packages/gradio/blocks.py", line 1013, in process_api
    inputs = self.preprocess_data(fn_index, inputs, state)
  File "/home/mantis/opt/stable2/venv/lib/python3.9/site-packages/gradio/blocks.py", line 911, in preprocess_data
    processed_input.append(block.preprocess(inputs[i]))
  File "/home/mantis/opt/stable2/venv/lib/python3.9/site-packages/gradio/components.py", line 540, in preprocess
    return self._round_to_precision(x, self.precision)
  File "/home/mantis/opt/stable2/venv/lib/python3.9/site-packages/gradio/components.py", line 502, in _round_to_precision
    return float(num)
ValueError: could not convert string to float: 'task(jk60qe2d5po1ezg)'

Steps to reproduce the problem

In the img2img tab, if the width/height sliders are set to increase the dimensions of the image, hit the 'generate' button.

What should have happened?

The expected result is the generation of a new image.

Commit where the problem happens

dfeee786f903e392dbef1519c7c246b9856ebab3

What platforms do you use to access the UI ?

Linux

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

Mp

List of extensions

a1111-sd-webui-tagcomplete SD-latent-mirroring stable-diffusion-webui-embedding-editor animator_extension sd-webui-controlnet stable-diffusion-webui-images-browser auto-sd-paint-ext sd-webui-multiple-hypernetworks stable-diffusion-webui-inspiration deforum stable-diffusion-loopback-color-correction-script stable-diffusion-webui-instruct-pix2pix depthmap2mask stable-diffusion-webui stable-diffusion-webui-normalmap-script gif2gif stable-diffusion-webui-aesthetic-gradients stable-diffusion-webui-tokenizer novelai-2-local-prompt stable-diffusion-webui-aesthetic-image-scorer stable-diffusion-webui-wildcards openpose-editor stable-diffusion-webui-anti-burn StylePile 'put extensions here.txt' stable-diffusion-webui-artists-to-study training-picker sd_dreambooth_extension stable-diffusion-webui-dataset-tag-editor unprompted sd-dynamic-prompts stable-diffusion-webui-depthmap-script video_loopback_for_webui

Console logs

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on mantis user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.9.12 (main, Apr  5 2022, 06:56:58) 
[GCC 7.5.0]
Commit hash: dfeee786f903e392dbef1519c7c246b9856ebab3
Installing requirements for Web UI

Installing imageio-ffmpeg requirement for depthmap script

Error running install.py for extension extensions/unprompted.
Command: "/home/mantis/opt/stable2/venv/bin/python3" "extensions/unprompted/install.py"
Error code: 1
stdout: Installing requirements for Unprompted

stderr: Traceback (most recent call last):
  File "/home/mantis/opt/stable2/extensions/unprompted/install.py", line 6, in <module>
    launch.run_pip("install pattern@git+https://github.com/NicolasBizzozzero/pattern","requirements for Unprompted")
  File "/home/mantis/opt/stable2/launch.py", line 145, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
  File "/home/mantis/opt/stable2/launch.py", line 113, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install requirements for Unprompted.
Command: "/home/mantis/opt/stable2/venv/bin/python3" -m pip install pattern@git+https://github.com/NicolasBizzozzero/pattern --prefer-binary
Error code: 1
stdout: Collecting pattern@ git+https://github.com/NicolasBizzozzero/pattern
  Cloning https://github.com/NicolasBizzozzero/pattern to /tmp/pip-install-4k6fyj4q/pattern_b19458df8c9f4def96993f42a67f8e39
  Resolved https://github.com/NicolasBizzozzero/pattern to commit 66ab34453a3443c06a4ebda092c8d1947c83b17a
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: future in ./venv/lib/python3.9/site-packages (from pattern@ git+https://github.com/NicolasBizzozzero/pattern) (0.18.3)
Collecting backports.csv
  Using cached backports.csv-1.0.7-py2.py3-none-any.whl (12 kB)
Collecting mysqlclient
  Using cached mysqlclient-2.1.1.tar.gz (88 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

stderr:   Running command git clone --filter=blob:none --quiet https://github.com/NicolasBizzozzero/pattern /tmp/pip-install-4k6fyj4q/pattern_b19458df8c9f4def96993f42a67f8e39
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /bin/sh: 1: mysql_config: not found
      /bin/sh: 1: mariadb_config: not found
      /bin/sh: 1: mysql_config: not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-4k6fyj4q/mysqlclient_a39187a95f02407dad20aec1d7f8bb06/setup.py", line 15, in <module>
          metadata, options = get_config()
        File "/tmp/pip-install-4k6fyj4q/mysqlclient_a39187a95f02407dad20aec1d7f8bb06/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
        File "/tmp/pip-install-4k6fyj4q/mysqlclient_a39187a95f02407dad20aec1d7f8bb06/setup_posix.py", line 31, in mysql_config
          raise OSError("{} not found".format(_mysql_config_path))
      OSError: mysql_config not found
      mysql_config --version
      mariadb_config --version
      mysql_config --libs
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: You are using pip version 22.0.4; however, version 23.0.1 is available.
You should consider upgrading via the '/home/mantis/opt/stable2/venv/bin/python3 -m pip install --upgrade pip' command.

[auto-sd-paint-ext] Commit hash: 3b82fedf98f9fdb2b523f8d4eafe817e149383f2
[auto-sd-paint-ext] Auto-update disabled.

Installing sd-dynamic-prompts requirements.txt

#######################################################################################################
Initializing Dreambooth
If submitting an issue on github, please provide the below text for debugging purposes:

Python revision: 3.9.12 (main, Apr  5 2022, 06:56:58) 
[GCC 7.5.0]
Dreambooth revision: bff61c6b92b79ece2e140ee240e0628dd9a4ebef
SD-WebUI revision: dfeee786f903e392dbef1519c7c246b9856ebab3

Checking Dreambooth requirements...
Ignoring tensorflow-macos: markers 'sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
Ignoring mediapipe-silicon: markers 'sys_platform == "darwin"' don't match your environment
Collecting accelerate==0.16.0
  Using cached accelerate-0.16.0-py3-none-any.whl (199 kB)
Collecting gitpython~=3.1.31
  Using cached GitPython-3.1.31-py3-none-any.whl (184 kB)
Collecting transformers~=4.26.1
  Using cached transformers-4.26.1-py3-none-any.whl (6.3 MB)
Installing collected packages: gitpython, accelerate, transformers
  Attempting uninstall: gitpython
    Found existing installation: GitPython 3.1.30
    Uninstalling GitPython-3.1.30:
      Successfully uninstalled GitPython-3.1.30
  Attempting uninstall: accelerate
    Found existing installation: accelerate 0.12.0
    Uninstalling accelerate-0.12.0:
      Successfully uninstalled accelerate-0.12.0
  Attempting uninstall: transformers
    Found existing installation: transformers 4.25.1
    Uninstalling transformers-4.25.1:
      Successfully uninstalled transformers-4.25.1
Successfully installed accelerate-0.16.0 gitpython-3.1.31 transformers-4.26.1

[+] torch version 1.13.1+cu117 installed.
[+] torchvision version 0.14.1+cu117 installed.
[+] accelerate version 0.16.0 installed.
[+] bitsandbytes version 0.35.4 installed.
[+] diffusers version 0.13.1 installed.
[+] transformers version 4.26.1 installed.
[+] xformers version 0.0.17.dev464 installed.

#######################################################################################################

Launching Web UI with arguments: 
2023-03-13 19:13:03.727913: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-03-13 19:13:04.261792: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory
2023-03-13 19:13:04.261838: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory
2023-03-13 19:13:04.261844: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
No module 'xformers'. Proceeding without it.
Hypernetwork-MonkeyPatch-Extension not found
Script path is 
ERROR:root:Aesthetic Image Scorer: Unable to load Windows tagging script from tools directory
Traceback (most recent call last):
  File "/home/mantis/opt/stable2/extensions/stable-diffusion-webui-aesthetic-image-scorer/scripts/image_scorer.py", line 26, in <module>
    from tools.add_tags import tag_files
  File "/home/mantis/opt/stable2/extensions/stable-diffusion-webui-aesthetic-image-scorer/tools/add_tags.py", line 6, in <module>
    import pythoncom
ModuleNotFoundError: No module named 'pythoncom'
Loading Unprompted v7.7.0 by Therefore Games
(SETUP) Initializing Unprompted object...
(SETUP) Loading configuration files...
(SETUP) Debug mode is False
Loading weights [0927370b55] from /home/mantis/opt/stable2/models/Stable-diffusion/model.ckpt
Creating model from config: /home/mantis/opt/stable2/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading VAE weights specified in settings: /home/mantis/opt/stable2/models/VAE/orangemix.vae.pt
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0): 
Textual inversion embeddings skipped(17): PhotoHelper, midjourney, rzviceb6, 21charturnerv2, nfixer, nartfixer, nrealfixer, HyperSmoke, laxpeintV2, VikingPunk, paintstyle8, VintageHelper-600, Art by Smoose-22, tarot768, dblx, CinemaHelper, dgtl
Model loaded in 1.8s (load weights from disk: 0.5s, create model: 0.3s, apply weights to model: 0.3s, apply half(): 0.3s, move model to device: 0.2s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
auto-sd-paint-ext:WARNING: COMMANDLINE_ARGS does not contain --api, API won't be mounted.
WARNING:auto-sd-paint-ext:COMMANDLINE_ARGS does not contain --api, API won't be mounted.
Startup time: 31.0s (import gradio: 1.3s, import ldm: 1.3s, other imports: 0.7s, list extensions: 1.7s, load scripts: 7.8s, load SD checkpoint: 1.8s, create ui: 16.3s).

Additional information

No response

sunilw commented 1 year ago

Something I forgot to add:

In 'settings'->'upscaling' I do have an upscaler set for img2img.

Setting an upscaler other than the default does not prevent the error from happening.

https://i.imgur.com/HpTy3Fq.png