stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Bug]: 'NoneType' object has no attribute 'process_text'
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Error when starting to type in the inpaint prompt
Steps to reproduce the problem
- load inpainting_1.5
- send a pic to Inpaint
- start typing in the prompt
- Result in the terminal:
- 'NoneType' object has no attribute 'process_text' =====
Traceback (most recent call last):
File "/home/q/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 284, in run_predict
output = await app.blocks.process_api(
File "/home/q/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 982, in process_api
result = await self.call_function(fn_index, inputs, iterator)
File "/home/q/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 824, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/q/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/q/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/home/q/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/home/q/stable-diffusion-webui/modules/ui.py", line 443, in update_token_counter
tokens, token_count, max_length = max([model_hijack.tokenize(prompt) for prompt in prompts], key=lambda args: args[1])
File "/home/q/stable-diffusion-webui/modules/ui.py", line 443, in <listcomp>
tokens, token_count, max_length = max([model_hijack.tokenize(prompt) for prompt in prompts], key=lambda args: args[1])
File "/home/q/stable-diffusion-webui/modules/sd_hijack.py", line 116, in tokenize
_, remade_batch_tokens, _, _, _, token_count = self.clip.process_text([text])
AttributeError: 'NoneType' object has no attribute 'process_text'
What should have happened?
proceed with inpaint config
Commit where the problem happens
Python 3.10.7 (main, Nov 2 2022, 18:49:29) [GCC 12.2.0] Commit hash: 7ba3923d5b494b7756d0b12f33acb3716d830b9a
What platforms do you use to access UI ?
Linux
What browsers do you use to access the UI ?
Google Chromium
Command Line Arguments
"--lowvram --opt-split-attention --precision full --no-half"
Additional information, context and logs
No response
I've been noticing the same problem recently. Sometimes it looks like the images might have completed their steps, other times definitely not. I'm seeing it when loading masks from a .png Progress bars in the ... black box thing that ive forgotten the name of... say they're completed to 100%, but looking at the images says something very different.
I'm on windows 10, rtx3060, firefox commandline: --autolaunch --api git pull .... I don't know how to github well, so uh, mystery commit? oct 12, 2am est
LatentInpaintDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.54 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Traceback (most recent call last):
File "C:\Users\me\stable-diffusion-webui\venv\lib\site-packages\gradio\routes.py", line 284, in run_predict
output = await app.blocks.process_api(
File "C:\Users\me\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 982, in process_api
result = await self.call_function(fn_index, inputs, iterator)
File "C:\Users\me\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 824, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\me\stable-diffusion-webui\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\Users\me\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\Users\me\stable-diffusion-webui\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\Users\me\stable-diffusion-webui\modules\ui.py", line 443, in update_token_counter
tokens, token_count, max_length = max([model_hijack.tokenize(prompt) for prompt in prompts], key=lambda args: args[1])
File "C:\Users\me\stable-diffusion-webui\modules\ui.py", line 443, in
I get this error when I try to load the SD2_0 Base Model.
I'm also getting this when trying to load the 2.0 model and it didn't happen before the most recent commits.
same problem,puzzled...
I don't think the base model is properly supported yet. https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#stable-diffusion-20
I get the same with 4x upscaler, already added config file as .yaml for 4x model https://github.com/Stability-AI/stablediffusion/blob/main/configs/stable-diffusion/x4-upscaling.yaml
I get the same with 4x upscaler, already added config file as .yaml for 4x model https://github.com/Stability-AI/stablediffusion/blob/main/configs/stable-diffusion/x4-upscaling.yaml
I have encountered the same problem. How did you solve it
@EllangoK how exactly was this "completed"?
Stable diffusion v2 models are fully supported, in painting models work as well. The system for loading them in as well has changed as you no longer even need the config files so there should be no issues there. It likely got fixed even before that as this error itself is major, and it's likely that the textbox was improperly bound at the time and was caught and fixed in another issue.
I have used both v2 and inpainting and they have been both working for a whole year. Arguably i have not the 4x upscaler mentioned in the last comment, so that could still be an issue but if so feel free to create another issue as it is not directly related and the issue would have changed greatly since the months of updates. @sashatc Are you even experiencing this issue, as it has been an inactive thread for a while?
Thank you a lot for the detailed explanation. I wanted to figure out if this one is really isolated and solved.
I am experiencing another, but very similar error issue described here #5604.
I see, I do think that maybe that issue should be re-opened as there is a bunch of recent activity on it confirming it still occurs. I believe we can keep this one closed as this one though is mostly talking about config files in the comments above, while the other issue does to seem to describe the error that causes it which is related to the parentheses. I will see if I can do anything for that.
I get this 'NoneType' object
error when loading the SD 2.1 checkpoint with a non-None SD VAE
selected, in Settings > Stable Diffusion.
This problem is not solved yet....
I get the same with 4x upscaler, already added config file as .yaml for 4x model https://github.com/Stability-AI/stablediffusion/blob/main/configs/stable-diffusion/x4-upscaling.yaml
this worked for me, thanks ^_^
This problem is not solved yet.
how can i solve this: Already up to date. venv "C:\Users\Nious\Desktop\sd.webui\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.9.3 Commit hash: 1c0a0c4c26f78c32095ebc7f8af82f5c04fca8c0 Installing requirements If submitting an issue on github, please provide the full startup log for debugging purposes.
Initializing Dreambooth Dreambooth revision: 45a12fe5950bf93205b6ef2b7511eb94052a241f Checking xformers... Checking bitsandbytes... Checking bitsandbytes (ALL!) Checking Dreambooth requirements... Installed version of bitsandbytes: 0.43.0 [Dreambooth] bitsandbytes v0.43.0 is already installed. Installed version of accelerate: 0.21.0 [Dreambooth] accelerate v0.21.0 is already installed. Installed version of dadaptation: 3.2 [Dreambooth] dadaptation v3.2 is already installed. Installed version of diffusers: 0.27.2 [Dreambooth] diffusers v0.25.0 is already installed. Installed version of discord-webhook: 1.3.0 [Dreambooth] discord-webhook v1.3.0 is already installed. Installed version of fastapi: 0.94.0 [Dreambooth] fastapi is already installed. Installed version of gitpython: 3.1.32 [Dreambooth] gitpython v3.1.40 is not installed. Successfully installed gitpython-3.1.43
Installed version of pytorch_optimizer: 2.12.0
[Dreambooth] pytorch_optimizer v2.12.0 is already installed.
Installed version of Pillow: 9.5.0
[Dreambooth] Pillow is already installed.
Installed version of tqdm: 4.66.2
[Dreambooth] tqdm is already installed.
Installed version of tomesd: 0.1.3
[Dreambooth] tomesd v0.1.2 is already installed.
Installed version of tensorboard: 2.13.0
[Dreambooth] tensorboard v2.13.0 is already installed.
[+] torch version 2.1.2+cu121 installed.
[+] torchvision version 0.16.2+cu121 installed.
[+] accelerate version 0.21.0 installed.
[+] diffusers version 0.27.2 installed.
[+] bitsandbytes version 0.43.0 installed.
[+] xformers version 0.0.23.post1 installed.
Launching Web UI with arguments: --disable-safe-unpickle --xformers --no-half
*** Error loading script: dream_artist_main.py
Traceback (most recent call last):
File "C:\Users\Nious\Desktop\sd.webui\webui\modules\scripts.py", line 508, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\Users\Nious\Desktop\sd.webui\webui\modules\script_loading.py", line 13, in load_module
module_spec.loader.exec_module(module)
File "
[AddNet] Updating model hashes... 0it [00:00, ?it/s] [AddNet] Updating model hashes... 0it [00:00, ?it/s] Loading weights [e1441589a6] from C:\Users\Nious\Desktop\sd.webui\webui\models\Stable-diffusion\v1-5-pruned.ckpt Creating model from config: C:\Users\Nious\Desktop\sd.webui\webui\configs\v1-inference.yaml Applying attention optimization: xformers... done. Model loaded in 4.8s (load weights from disk: 2.5s, create model: 0.4s, apply weights to model: 0.7s, calculate empty prompt: 1.0s). calling C:\Users\Nious\Desktop\sd.webui\webui\extensions\sd-webui-cn-in-extras-tab\scripts\cn_in_extras_tab.py/ui: ImportError Traceback (most recent call last): File "C:\Users\Nious\Desktop\sd.webui\webui\modules\scripts_postprocessing.py", line 103, in wrap_call res = func(*args, **kwargs) File "C:\Users\Nious\Desktop\sd.webui\webui\extensions\sd-webui-cn-in-extras-tab\scripts\cn_in_extras_tab.py", line 110, in ui from scripts import global_state ImportError: cannot import name 'global_state' from 'scripts' (unknown location)
Traceback (most recent call last):
File "C:\Users\Nious\Desktop\sd.webui\webui\launch.py", line 48, in