camenduru / stable-diffusion-webui-colab

stable diffusion webui colab
The Unlicense
15.58k stars 2.61k forks source link

[Bug]: AttributeError: 'NoneType' object has no attribute 'convert' #358

Closed camenduru closed 1 year ago

camenduru commented 1 year ago

What happened?

from civitai chilloutmix_NiPrunedFp16Fix.safetensors failed 😐

Colab cell output

models/Stable-diffusion/ChilloutMix/chilloutmix_NiPrunedFp16Fix.safetensors successfully downloaded.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/content/stable-diffusion-webui/modules/ui.py", line 277, in update_token_counter
    token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0])
  File "/content/stable-diffusion-webui/modules/ui.py", line 277, in <listcomp>
    token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0])
  File "/content/stable-diffusion-webui/modules/sd_hijack.py", line 219, in get_prompt_lengths
    _, token_count = self.clip.process_texts([text])
AttributeError: 'NoneType' object has no attribute 'process_texts'
Calculating sha256 for /content/stable-diffusion-webui/models/Stable-diffusion/ChilloutMix/chilloutmix_NiPrunedFp16Fix.safetensors: 59ffe2243a25c9fe137d590eb3c5c3d3273f1b4c86252da11bbdc9568773da0c
Loading weights [59ffe2243a] from /content/stable-diffusion-webui/models/Stable-diffusion/ChilloutMix/chilloutmix_NiPrunedFp16Fix.safetensors
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.9/dist-packages/gradio/blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.9/dist-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/content/stable-diffusion-webui/modules/ui.py", line 277, in update_token_counter
    token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0])
  File "/content/stable-diffusion-webui/modules/ui.py", line 277, in <listcomp>
    token_count, max_length = max([model_hijack.get_prompt_lengths(prompt) for prompt in prompts], key=lambda args: args[0])
  File "/content/stable-diffusion-webui/modules/sd_hijack.py", line 219, in get_prompt_lengths
    _, token_count = self.clip.process_texts([text])
AttributeError: 'NoneType' object has no attribute 'process_texts'
Applying xformers cross attention optimization.
Weights loaded in 7.8s (calculate hash: 6.2s, load weights from disk: 0.1s, apply weights to model: 0.6s, move model to device: 0.8s).
Error completing request
Arguments: ('task(8bxd3sgz405drc6)', 0, 'duck', '', [], None, None, None, None, None, None, None, 20, 0, 4, 0, 1, False, False, 1, 1, 7, 1.5, 0.75, -1.0, -1.0, 0, 0, 0, False, 512, 512, 0, 0, 32, 0, '', '', '', [], 0, False, False, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', False, '1:1,1:2,1:2', '0:0,0:0,0:1', '0.2,0.8,0.8', 150, 0.2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, '<ul>\n<li><code>CFG Scale</code> should be 2 or lower.</li>\n</ul>\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 1, 'None', 100, 0.6, 20, 0.0, 0.0, '', True, True, '', 10, 40, 'VP9 (webm)', '', True, 20, 'None', None, 1, 'None', False, False, 'PreviousFrame', '<p style="margin-bottom:0.75em">Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8</p>', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, 'positive', 'comma', 0, False, False, '', '', '<p style="margin-bottom:0.75em">Will upscale the image by the selected scale factor; use width and height sliders to set tile size</p>', 64, 0, 2, 1, '', 0, '', 0, '', True, False, False, False, 0) {}
Traceback (most recent call last):
  File "/content/stable-diffusion-webui/modules/call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "/content/stable-diffusion-webui/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/content/stable-diffusion-webui/modules/img2img.py", line 87, in img2img
    image = init_img.convert("RGB")
AttributeError: 'NoneType' object has no attribute 'convert'

Error completing request
Arguments: ('task(nq789yxmlsl9joz)', 0, 'duck', '', [], None, None, None, None, None, None, None, 20, 0, 4, 0, 1, False, False, 1, 1, 7, 1.5, 0.75, -1.0, -1.0, 0, 0, 0, False, 512, 512, 0, 0, 32, 0, '', '', '', [], 0, False, False, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, 'LoRA', 'None', 1, 1, None, 'Refresh models', False, '1:1,1:2,1:2', '0:0,0:0,0:1', '0.2,0.8,0.8', 150, 0.2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, '<ul>\n<li><code>CFG Scale</code> should be 2 or lower.</li>\n</ul>\n', True, True, '', '', True, 50, True, 1, 0, False, 4, 1, 'None', 100, 0.6, 20, 0.0, 0.0, '', True, True, '', 10, 40, 'VP9 (webm)', '', True, 20, 'None', None, 1, 'None', False, False, 'PreviousFrame', '<p style="margin-bottom:0.75em">Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8</p>', 128, 8, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, False, 'positive', 'comma', 0, False, False, '', '', '<p style="margin-bottom:0.75em">Will upscale the image by the selected scale factor; use width and height sliders to set tile size</p>', 64, 0, 2, 1, '', 0, '', 0, '', True, False, False, False, 0) {}
Traceback (most recent call last):
  File "/content/stable-diffusion-webui/modules/call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "/content/stable-diffusion-webui/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/content/stable-diffusion-webui/modules/img2img.py", line 87, in img2img
    image = init_img.convert("RGB")
AttributeError: 'NoneType' object has no attribute 'convert'

Which colab and model(s) were you using when the error occurred?

https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/main/video/lite/stable_diffusion_1_5_video_webui_colab.ipynb

from civitai chilloutmix_NiPrunedFp16Fix.safetensors

Which Public WebUI Colab URL were you using when the error occurred?

remote.moe

If you used HiRes mode when the error occurred, please provide the Hires info

No response