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

Error "Not enough image data" with palette swap node #6

Open
aurel-g opened this issue Dec 22, 2024 · 0 comments
Open

Error "Not enough image data" with palette swap node #6

aurel-g opened this issue Dec 22, 2024 · 0 comments

Comments

@aurel-g
Copy link

aurel-g commented Dec 22, 2024

The 2 other nodes (palette reduce and downscale) are pretty straightforward to use but I got an error message ("Not enough image data") when I try to use the palette swapping node.

Here is the full log:

2024-12-22T23:08:40.117980 - got prompt
2024-12-22T23:08:40.123121 - !!! Exception during processing !!! not enough image data
2024-12-22T23:08:40.123532 - Traceback (most recent call last):
  File "/mnt/comfyui/app/execution.py", line 328, 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 "/mnt/comfyui/app/execution.py", line 203, 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 "/mnt/comfyui/app/execution.py", line 174, in _map_node_over_list
    process_inputs(input_dict, i)
  File "/mnt/comfyui/app/execution.py", line 163, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/comfyui/app/custom_nodes/comfyui-pixel/comfy_annotations.py", line 257, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/comfyui/app/custom_nodes/comfyui-pixel/nodes.py", line 77, in palette_swap_node
    palette_image = tensor2pil(palette_image)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/comfyui/app/custom_nodes/comfyui-pixel/utilities/torch_utils.py", line 10, in tensor2pil
    return Image.fromarray(
           ^^^^^^^^^^^^^^^^
  File "/mnt/comfyui/env/python3.11/e714c74f9e56009e897722375dcaad5e/lib/python3.11/site-packages/PIL/Image.py", line 3342, in fromarray
    return frombuffer(mode, size, obj, "raw", rawmode, 0, 1)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/comfyui/env/python3.11/e714c74f9e56009e897722375dcaad5e/lib/python3.11/site-packages/PIL/Image.py", line 3244, in frombuffer
    return frombytes(mode, size, data, decoder_name, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/comfyui/env/python3.11/e714c74f9e56009e897722375dcaad5e/lib/python3.11/site-packages/PIL/Image.py", line 3181, in frombytes
    im.frombytes(data, decoder_name, decoder_args)
  File "/mnt/comfyui/env/python3.11/e714c74f9e56009e897722375dcaad5e/lib/python3.11/site-packages/PIL/Image.py", line 886, in frombytes
    raise ValueError(msg)
ValueError: not enough image data

Maybe it's a bug or maybe I dont use it well ? (an example workflow would be nice)

2024-12-23_00-20

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

1 participant