chflame163 / ComfyUI_LayerStyle

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
MIT License
1.52k stars 86 forks source link

cannot access local variable 'processor' where it is not associated with a value #308

Open formulake opened 1 month ago

formulake commented 1 month ago

Running Florence has been throwing up this error for a couple of days. Any help would be appreciated.

# 😺dzNodes: LayerStyle -> Error loading model CogFlorence-2.1-Large: list.remove(x): x not in list
# 😺dzNodes: LayerStyle -> Attempting to load tokenizer instead of processor...
# 😺dzNodes: LayerStyle -> Error loading model or tokenizer: name 'AutoTokenizer' is not defined
!!! Exception during processing !!! cannot access local variable 'processor' where it is not associated with a value
Traceback (most recent call last):
  File "F:\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "F:\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\florence2_ultra.py", line 402, in load
    self.model, self.processor = load_model(version)
                                 ^^^^^^^^^^^^^^^^^^^
  File "F:\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\florence2_ultra.py", line 63, in load_model
    return (model.to(device), processor)
                              ^^^^^^^^^
UnboundLocalError: cannot access local variable 'processor' where it is not associated with a value
yovsac commented 5 days ago

HI, having the same issue but for me it says "tokenizer" instead of "processor". did you find a solution?