InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Server error: 'NoneType' object has no attribute 'process'

Open cmeth990 opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

macOS

GPU

cpu

VRAM

16GB

What happened?

I just launched the webUI and after invoking for text2img or img2img receive the same error, listed in the title.

Screenshots

No response

Additional context

No response

Contact Details

No response

cmeth990 avatar Dec 16 '22 22:12 cmeth990

@cmeth990 - Can you share more of the traceback, and the specific settings of your txt2img and img2img?

hipsterusername avatar Dec 17 '22 04:12 hipsterusername

hi, I have the same issue and here's the traceback:

Postprocessing requested for "outputs/000140.89ca0d60.3136938560.png": {'type': 'codeformer', 'facetool_strength': 0.9, 'codeformer_fidelity': 0.75}

Traceback (most recent call last): File "/Users/luizmaiaj/invokeai2.3/.venv/lib/python3.10/site-packages/invokeai/backend/invoke_ai_web_server.py", line 693, in handle_run_postprocessing image = self.codeformer.process( AttributeError: 'NoneType' object has no attribute 'process'

luizmaiaj avatar Feb 16 '23 13:02 luizmaiaj

hi, I have the same issue and here's the traceback:

'NoneType' object has no attribute 'process'

Traceback (most recent call last): File "/Users/yinkai/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/invoke_ai_web_server.py", line 1204, in generate_images self.generate.prompt2image( File "/Users/yinkai/invokeai/.venv/lib/python3.10/site-packages/ldm/generate.py", line 516, in prompt2image results = generator.generate( File "/Users/yinkai/invokeai/.venv/lib/python3.10/site-packages/ldm/invoke/ckpt_generator/base.py", line 114, in generate image_callback(image, seed, first_seed=first_seed, attention_maps_image=attention_maps_image) File "/Users/yinkai/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/invoke_ai_web_server.py", line 1091, in image_done image = self.gfpgan.process( AttributeError: 'NoneType' object has no attribute 'process'

MirYin avatar Feb 22 '23 05:02 MirYin

I'm done

Keep the model folder and delete all

Reinstall according to the previous manual installation method

Select Skip when downloading the model, then copy the model folder back and continue the installation until it is completed

MirYin avatar Feb 22 '23 12:02 MirYin

@MirYin This resolved it for you?

hipsterusername avatar Feb 22 '23 17:02 hipsterusername

@MirYin这给你解决了吗?

yes

I solved the problem. I deleted all the files and reinstalled them according to the manual installation mode

The prerequisite is to set the version of python at 3.9.6 or 3.10.9

MirYin avatar Feb 23 '23 05:02 MirYin

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 14 '23 06:03 github-actions[bot]

This happens to me when face restoration is on. Either gfpgan or codeformer. I have a fresh installation of the latest version of invoke ai.

Traceback (most recent call last): File "/Users/.../invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/invoke_ai_web_server.py", line 1293, in generate_images self.generate.prompt2image( File "/Users/.../invokeai/.venv/lib/python3.10/site-packages/ldm/generate.py", line 559, in prompt2image results = generator.generate( File "/Users/.../invokeai/.venv/lib/python3.10/site-packages/ldm/invoke/generator/base.py", line 124, in generate image_callback(image, seed, first_seed=first_seed, attention_maps_image=attention_maps_image) File "/Users/.../invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/invoke_ai_web_server.py", line 1180, in image_done image = self.codeformer.process( AttributeError: 'NoneType' object has no attribute 'process'

Same thing happens with gfpgan except this line is slightly different:

image = self.gfpgan.process( AttributeError: 'NoneType' object has no attribute 'process'

ATrubka avatar Mar 29 '23 03:03 ATrubka

>> Facetool Parameters: {'type': 'codeformer', 'strength': 0.8, 'codeformer_fidelity': 1}
100%|████████████████████████████████████████████████████████████████████████████████████████████████| 150/150 [03:02<00:00,  1.22s/it]
Generating:   0%|                                                                                                | 0/1 [03:04<?, ?it/s]
'NoneType' object has no attribute 'process'


Traceback (most recent call last):
  File "/Users/hazout/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/web/invoke_ai_web_server.py", line 1313, in generate_images
    self.generate.prompt2image(
  File "/Users/hazout/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/generate.py", line 505, in prompt2image
    results = generator.generate(
  File "/Users/hazout/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/generator/base.py", line 392, in generate
    image_callback(
  File "/Users/hazout/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/web/invoke_ai_web_server.py", line 1204, in image_done
    image = self.codeformer.process(
AttributeError: 'NoneType' object has no attribute 'process'

On a Mac M1 Pro, latest release

NathanHazout avatar Mar 31 '23 14:03 NathanHazout

Same issue using v2.3.5.post2 on M1 Max Macbook Pro when using either gfpgan or codeformer face restoration:

>> Facetool Parameters: {'type': 'gfpgan', 'strength': 0.75}
100%|███████████████████████████████████████████| 50/50 [00:30<00:00,  1.66it/s]
Generating:   0%|                                         | 0/4 [00:30<?, ?it/s]
'NoneType' object has no attribute 'process'


Traceback (most recent call last):
  File "/Users/joel/Dev/AI/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/invoke_ai_web_server.py", line 1344, in generate_images
    self.generate.prompt2image(
  File "/Users/joel/Dev/AI/invokeai/.venv/lib/python3.10/site-packages/ldm/generate.py", line 570, in prompt2image
    results = generator.generate(
  File "/Users/joel/Dev/AI/invokeai/.venv/lib/python3.10/site-packages/ldm/invoke/generator/base.py", line 124, in generate
    image_callback(image, seed, first_seed=first_seed, attention_maps_image=attention_maps_image)
  File "/Users/joel/Dev/AI/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/invoke_ai_web_server.py", line 1222, in image_done
    image = self.gfpgan.process(
AttributeError: 'NoneType' object has no attribute 'process'

jbcaveman avatar Jul 01 '23 17:07 jbcaveman

For anyone looking to solve this issue, check that your gfpgan and codeformer models are in the expected directory. This error is thrown when the models cannot be found. Missing models are logged upon startup.

jbcaveman avatar Jul 05 '23 16:07 jbcaveman