diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6f9226 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +# Virtual environments +venv/ +ENV/ +env/ + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db diff --git a/efficiency_nodes.py b/efficiency_nodes.py index 286d84d..ff9511c 100644 --- a/efficiency_nodes.py +++ b/efficiency_nodes.py @@ -3957,6 +3957,12 @@ class TSC_ImageOverlay: samples = overlay_image.movedim(-1, 1) overlay_image = comfy.utils.common_upscale(samples, overlay_image_size[0], overlay_image_size[1], resize_method, False) overlay_image = overlay_image.movedim(1, -1) + + # Handle batch dimension - use first image if overlay_image is a batch + if len(overlay_image.shape) == 4: + if overlay_image.shape[0] > 1: + print(f"{warning('Image Overlay Warning:')} Multiple overlay images detected ({overlay_image.shape[0]}), using only the first image.") + overlay_image = overlay_image[0] overlay_image = tensor2pil(overlay_image)