Skip to content

ImageScaleByAspectRation and empty mask on input error #573

@AlexK98

Description

@AlexK98

Hello,

Thanks for nodes pack.
Found an error. When there is input on Mask parameter, but there is no actual mask coming from the source then UltimateSD Upscale fails with the following error message. If no mask param connected from Load Image to ImageScaleByAspectRation no error happens.

`!!! Exception during processing !!! object of type 'NoneType' has no len()

Traceback (most recent call last):
File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 498, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)

File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 316, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)

File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-lora-manager\py\metadata_collector\metadata_hook.py", line 165, in async_map_node_over_list_with_metadata
results = await original_map_node_over_list(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 290, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 278, in process_inputs
result = f(**inputs)
^^^^^^^^^^^
File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_ultimatesdupscale\nodes.py", line 133, in upscale
shared.batch = [tensor_to_pil(image, i) for i in range(len(image))]
^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()`

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions