Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LayerUtility: Florence2Image2Prompt 'NoneType' object is not callable #477

Open
liaceboy opened this issue Jan 13, 2025 · 2 comments
Open

Comments

@liaceboy
Copy link

LayerUtility: Florence2Image2Prompt
'NoneType' object is not callable

@franckdsf
Copy link

Im having the same issue

# 😺dzNodes: LayerStyle -> �[1;33mDownloading Florence2 base-PromptGen-v2.0 model...�[m

Fetching 13 files:   0%|          | 0/13 [00:00<?, ?it/s]
Fetching 13 files:   8%|▊         | 1/13 [00:00<00:08,  1.37it/s]
Fetching 13 files:  46%|████▌     | 6/13 [00:25<00:31,  4.52s/it]
Fetching 13 files: 100%|██████████| 13/13 [00:25<00:00,  2.00s/it]
!!! Exception during processing !!! 'NoneType' object is not callable
Traceback (most recent call last):
  File "/comfyui/execution.py", line 327, 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 "/comfyui/execution.py", line 202, 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 "/comfyui/execution.py", line 174, in _map_node_over_list
    process_inputs(input_dict, i)
  File "/comfyui/execution.py", line 163, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "/comfyui/custom_nodes/comfyui_layerstyle/py/florence2_ultra.py", line 585, in florence2_image2prompt
    results, output_image = process_image(model, processor, img, task, max_new_tokens, num_beams,
  File "/comfyui/custom_nodes/comfyui_layerstyle/py/florence2_ultra.py", line 235, in process_image
    result = run_example(model, processor, task_prompt, image, max_new_tokens, num_beams, do_sample)
  File "/comfyui/custom_nodes/comfyui_layerstyle/py/florence2_ultra.py", line 210, in run_example
    inputs = processor(text=prompt, images=image, return_tensors="pt").to(device)
TypeError: 'NoneType' object is not callable

@franckdsf
Copy link

franckdsf commented Jan 22, 2025

related #332 and #322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants