Open oliverban opened 11 months ago
Interesting. Since Fit Size was meant to output a singular size, it wasn't made to handle batches as input.
Interesting. Since Fit Size was meant to output a singular size, it wasn't made to handle batches as input.
Ah, okey, I thought it did since it did have that batch size input! I've since rebuilt my workflow to work as intended!
I'll make an update to pick the first item if a batch is sent.
I'll make an update to pick the first item if a batch is sent.
Much appreciated, this little node makes Vid2Vid much faster and cleaner with less nodes controlling resizing!
It doesn't work even if I type in the batch size manually. With 1 image/frame it works. As title says. I get this error:
Error occurred when executing FS: Fit Image And Resize:
Cannot handle this data type: (1, 1, 768, 3), |u1
File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-fitsize\nodes.py", line 216, in fit_resize_latent return fit_and_resize_image(image, vae, max_size, resampling, upscale, batch_size, add_noise) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-fitsize\nodes.py", line 63, in fit_and_resize_image img = tensor2pil(image) ^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-fitsize\nodes.py", line 11, in tensor2pil return Image.fromarray(np.clip(255. image.cpu().numpy().squeeze(), 0, 255).astype(np.uint8)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Oliver\Documents\Github\ComfyUI_windows_portable\python_embeded\Lib\site-packages\PIL\Image.py", line 3092, in fromarray raise TypeError(msg) from e
Here is my setup: