kijai / ComfyUI-SUPIR

SUPIR upscaling wrapper for ComfyUI
Other
1.58k stars 86 forks source link

TypeError: 'NoneType' object is not callable in node "SUPIR Conditioner" #72

Open camoody1 opened 7 months ago

camoody1 commented 7 months ago

My workflow was working successfully earlier today, but after a reboot and update of my system, I'm now getting the following error message in the "SUPIR Conditioner" node.

got prompt
captions:  [['']]
Batch captioning
!!! Exception during processing !!!
Traceback (most recent call last):
  File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-SUPIR\nodes_v2.py", line 553, in condition
    _c, _uc = SUPIR_model.conditioner.get_unconditional_conditioning(cond, uncond)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-SUPIR\sgm\modules\encoders\modules.py", line 187, in get_unconditional_conditioning
    c = self(batch_c)
        ^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-SUPIR\sgm\modules\encoders\modules.py", line 208, in forward
    emb_out = embedder(batch[embedder.input_key])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "H:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-SUPIR\sgm\modules\encoders\modules.py", line 490, in forward
    batch_encoding = self.tokenizer(
                     ^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

Prompt executed in 0.10 seconds
kijai commented 7 months ago

Hmm what kind of workflow? I can't seem to be able to reproduce this with mine, old or new.

camoody1 commented 7 months ago

I'm just running your base example workflow. But something must have changed very recently, because I just restarted Comfy and now the workflow is running successfully. Did you change something in the last hour or so?

kijai commented 7 months ago

I'm just running your base example workflow. But something must have changed very recently, because I just restarted Comfy and now the workflow is running successfully. Did you change something in the last hour or so?

I did, but it was for different error message. Perhaps it was caused by same issue if it works for you now.

camoody1 commented 7 months ago

Yeah, I was just able to successfully run the same workflow that was failing for me earlier. 🤷🏼

tylerdurrett commented 7 months ago

I had the same issue, but it is also currently working for me.

doggeddalle commented 7 months ago

i got the error cause i realized I hadn't selected Supir model on Loader node. User error on my part

arikuzu commented 6 months ago

I got the same error from the workflow that is on examples folder of the custom nodes. Also i got my whole ComfyUI setup on my NAS server. Any idea on how to solve it ? image

RedDeltas commented 5 months ago

I'm having this identical issue

kijai commented 5 months ago

These NoneType errors are typically because one of the models is not selected properly.

SuperMasterBlasterLaser commented 5 months ago

I'm still receiving this error:

image

It happens on SUPIR Conditioner.

I've loaded SUPIR-v0Q.ckpt

firofame commented 5 months ago

Screenshot 2024-05-25 at 1 26 38 PM

Error occurred when executing SUPIR_conditioner:

noembryo commented 5 months ago

Same here..

firofame commented 5 months ago

anyone else using fast-stable-diffusion in runpod?

s0l4r commented 5 months ago

same issue here, fast-stable-diffusion in paperspaces

Traceback (most recent call last):
  File "/notebooks/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/notebooks/ComfyUI/execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/notebooks/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/notebooks/ComfyUI/custom_nodes/ComfyUI-SUPIR/nodes_v2.py", line 617, in condition
    _c, _uc = SUPIR_model.conditioner.get_unconditional_conditioning(cond, uncond)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/notebooks/ComfyUI/custom_nodes/ComfyUI-SUPIR/sgm/modules/encoders/modules.py", line 187, in get_unconditional_conditioning
    c = self(batch_c)
        ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/notebooks/ComfyUI/custom_nodes/ComfyUI-SUPIR/sgm/modules/encoders/modules.py", line 208, in forward
    emb_out = embedder(batch[embedder.input_key])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/notebooks/ComfyUI/custom_nodes/ComfyUI-SUPIR/sgm/modules/encoders/modules.py", line 490, in forward
    batch_encoding = self.tokenizer(
                     ^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable
438443467 commented 5 months ago

我想这是因为依赖被更改了,我重新pip install -r requirements.txt后,问题得到了解决。

wistin123 commented 3 months ago

problem I have the same problem. I have already reinstalled the requirement, but I did not work. I restart the comfyUI many times, but it still has problem. Please help me solve this problem, thanks !

kijai commented 3 months ago

problem I have the same problem. I have already reinstalled the requirement, but I did not work. I restart the comfyUI many times, but it still has problem. Please help me solve this problem, thanks !

You have SD3 model selected, SUPIR only works with SDXL models.

wistin123 commented 3 months ago

problem I have the same problem. I have already reinstalled the requirement, but I did not work. I restart the comfyUI many times, but it still has problem. Please help me solve this problem, thanks !

You have SD3 model selected, SUPIR only works with SDXL models.

Thanks! I will try it later.

linkcoindoc commented 4 weeks ago

problem I have the same problem. I have already reinstalled the requirement, but I did not work. I restart the comfyUI many times, but it still has problem. Please help me solve this problem, thanks !

You have SD3 model selected, SUPIR only works with SDXL models.

I have also encountered this issue, and I'm reaching out to express my gratitude.