🖼️AGSoft Add Images
What AGSoft Add Images is actually for
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
- image_10
- image_11
- image_12
- image_13
- image_14
- image_15
- image_16
- image_17
- image_18
- image_19
- image_20
- image_21
- image_22
- image_23
- image_24
- image_25
- image_26
- image_27
- image_28
- image_29
- image_30
- image_31
- image_32
- image_33
- image_34
- image_35
- image_36
- image_37
- image_38
- image_39
- image_40
- image_41
- image_42
- image_43
- image_44
- image_45
- image_46
- image_47
- image_48
- image_49
- image_50
- images
Five branches, each ending in an IMAGE, and the node you want to feed takes exactly one. Core's ImageBatch will glue two together - only two, and only if they're the same size. Stack three of them and you've got a little ladder of nodes whose ordering you'll forget by Thursday.
AGSoft Add Images is the blunt fix: up to 50 optional IMAGE inputs on one node, and one images output you can wire anywhere.
Why it exists, beyond "more inputs"
Because it makes a decision core nodes don't. resize_mode (default keep) tells the node how to reconcile mismatched sizes:
keepdoesn't touch your pixels. If every image is the same size you get a normal batch tensor - completely compatible with Preview, Save Image, and anything else expecting a tensor. If the sizes differ, you get a list of tensors at their original sizes.stretchforces everything to the first image's dimensions, distortion and all.containfits proportionally inside the first image's size, padding the leftovers black.coverscales proportionally and center-crops to the first image's size.
The last three always give you one batch tensor, with upscale_method (default lanczos) picking the interpolation. The honest take: keep is the mode you'll live in, and its list output is the reason to install this at all. It's also the thing that will confuse you first, because a list is not a batch - see below.
How it works, mechanically
The node declares 50 optional image_1 … image_50 sockets. Unconnected optional inputs simply arrive as None and get skipped - the same convention every switch and fallback node in ComfyUI runs on. So the node walks the slots in numerical order, and that order is your output order, regardless of where the sockets sit on your canvas. Rewire a branch and you may silently reorder the batch.
Batches get exploded: if you hand it a tensor with 4 frames, those 4 frames enter the aggregation as 4 separate images. Channel counts are unified to the max (an RGBA image next to RGB ones pads the RGB side with alpha = 1, i.e. opaque). One thing worth knowing: the input side of the slot count is JavaScript, shipped in the pack's web/ folder. It keeps exactly (connected + 1) slots on screen and trims the other 49 so the node doesn't look like a fire escape.
The bits you set
resize_mode is the only widget most people ever touch; upscale_method matters only when you're not in keep. Then wire images into the slots. The output is images - hand it to Save Image, a preview, an images-to-video node, or the pack's own 🖼️AGSoft Image Stitch Plus, whose input_images accepts single tensors, batches, and lists, which is the intended pairing.
Installing it
ComfyUI Manager, search comfyui-AGSoft, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git
Restart ComfyUI. The pack's requirements.txt pulls numpy>=1.26.4, opencv-python>=4.7.0.72 and translators (that last one is for the pack's translate nodes, not this one - it installs regardless). No model downloads. This is a big pack from a Russian-speaking author whose documentation lives mostly on his Telegram channel, and it has essentially no Reddit footprint at all - you're reading the code, not the crowd, when something goes wrong. If the node doesn't appear, it's almost always the environment rather than the node: conflicting pins across a stack of installed packs are the standard ComfyUI injury, because there's no isolation between them.
Where people get burned
The list trap. keep + mismatched sizes → a list, and plenty of nodes only understand tensors. If a downstream node errors or does something weird, that's your first suspect. Fix it by switching to contain/cover, or by resizing upstream.
Which image is "first". stretch, contain and cover all target the first connected slot, i.e. the lowest-numbered one - not the biggest, not the one you dragged in last.
Sketchy slots. If the browser-side extension didn't load, you'll see all 50 sockets instead of a tidy few. The node still runs. A hard refresh fixes the cosmetics.
Alpha edge cases. Add Images always pads channels up, never down. Mixing RGBA and RGB gives you RGBA, with an opaque alpha on the RGB ones. That's fine for saving, occasionally not fine for a model that wants exactly 3 channels.
Inputs (52)
| Name | Type | Default | Description |
|---|---|---|---|
| resize_modeopt | COMBO | keep | Size handling: • keep — do not resize; output is a batch if all sizes equal, otherwise a list of tensors (default) • stretch — resize every image exactly to the first image size (possible distortion) • contain — proportional fit inside the first image size, pads are black • cover — proportional scale and center-crop to the first image size stretch/contain/cover always output a single batch tensor. --- Обработка размеров: • keep — не изменять размеры; выход — батч при одинаковых размерах, иначе список тензоров (по умолчанию) • stretch — привести каждое изображение точно к размеру первого (возможно искажение) • contain — пропорционально вписать в размер первого, поля чёрным • cover — пропорционально масштабировать и центрально обрезать до размера первого stretch/contain/cover всегда дают один батч-тензор. |
| upscale_methodopt | COMBO | lanczos | Interpolation used by stretch/contain/cover. Ignored in keep. --- Интерполяция для stretch/contain/cover. Игнорируется в keep. |
| image_1opt | IMAGE | Optional image input 1. Connecting the last slot creates the next one. --- Опциональный вход изображения 1. Подключение к последнему слоту создаёт следующий. | |
| image_2opt | IMAGE | Optional image input 2. Connecting the last slot creates the next one. --- Опциональный вход изображения 2. Подключение к последнему слоту создаёт следующий. | |
| image_3opt | IMAGE | Optional image input 3. Connecting the last slot creates the next one. --- Опциональный вход изображения 3. Подключение к последнему слоту создаёт следующий. | |
| image_4opt | IMAGE | Optional image input 4. Connecting the last slot creates the next one. --- Опциональный вход изображения 4. Подключение к последнему слоту создаёт следующий. | |
| image_5opt | IMAGE | Optional image input 5. Connecting the last slot creates the next one. --- Опциональный вход изображения 5. Подключение к последнему слоту создаёт следующий. | |
| image_6opt | IMAGE | Optional image input 6. Connecting the last slot creates the next one. --- Опциональный вход изображения 6. Подключение к последнему слоту создаёт следующий. | |
| image_7opt | IMAGE | Optional image input 7. Connecting the last slot creates the next one. --- Опциональный вход изображения 7. Подключение к последнему слоту создаёт следующий. | |
| image_8opt | IMAGE | Optional image input 8. Connecting the last slot creates the next one. --- Опциональный вход изображения 8. Подключение к последнему слоту создаёт следующий. | |
| image_9opt | IMAGE | Optional image input 9. Connecting the last slot creates the next one. --- Опциональный вход изображения 9. Подключение к последнему слоту создаёт следующий. | |
| image_10opt | IMAGE | Optional image input 10. Connecting the last slot creates the next one. --- Опциональный вход изображения 10. Подключение к последнему слоту создаёт следующий. | |
| image_11opt | IMAGE | Optional image input 11. Connecting the last slot creates the next one. --- Опциональный вход изображения 11. Подключение к последнему слоту создаёт следующий. | |
| image_12opt | IMAGE | Optional image input 12. Connecting the last slot creates the next one. --- Опциональный вход изображения 12. Подключение к последнему слоту создаёт следующий. | |
| image_13opt | IMAGE | Optional image input 13. Connecting the last slot creates the next one. --- Опциональный вход изображения 13. Подключение к последнему слоту создаёт следующий. | |
| image_14opt | IMAGE | Optional image input 14. Connecting the last slot creates the next one. --- Опциональный вход изображения 14. Подключение к последнему слоту создаёт следующий. | |
| image_15opt | IMAGE | Optional image input 15. Connecting the last slot creates the next one. --- Опциональный вход изображения 15. Подключение к последнему слоту создаёт следующий. | |
| image_16opt | IMAGE | Optional image input 16. Connecting the last slot creates the next one. --- Опциональный вход изображения 16. Подключение к последнему слоту создаёт следующий. | |
| image_17opt | IMAGE | Optional image input 17. Connecting the last slot creates the next one. --- Опциональный вход изображения 17. Подключение к последнему слоту создаёт следующий. | |
| image_18opt | IMAGE | Optional image input 18. Connecting the last slot creates the next one. --- Опциональный вход изображения 18. Подключение к последнему слоту создаёт следующий. | |
| image_19opt | IMAGE | Optional image input 19. Connecting the last slot creates the next one. --- Опциональный вход изображения 19. Подключение к последнему слоту создаёт следующий. | |
| image_20opt | IMAGE | Optional image input 20. Connecting the last slot creates the next one. --- Опциональный вход изображения 20. Подключение к последнему слоту создаёт следующий. | |
| image_21opt | IMAGE | Optional image input 21. Connecting the last slot creates the next one. --- Опциональный вход изображения 21. Подключение к последнему слоту создаёт следующий. | |
| image_22opt | IMAGE | Optional image input 22. Connecting the last slot creates the next one. --- Опциональный вход изображения 22. Подключение к последнему слоту создаёт следующий. | |
| image_23opt | IMAGE | Optional image input 23. Connecting the last slot creates the next one. --- Опциональный вход изображения 23. Подключение к последнему слоту создаёт следующий. | |
| image_24opt | IMAGE | Optional image input 24. Connecting the last slot creates the next one. --- Опциональный вход изображения 24. Подключение к последнему слоту создаёт следующий. | |
| image_25opt | IMAGE | Optional image input 25. Connecting the last slot creates the next one. --- Опциональный вход изображения 25. Подключение к последнему слоту создаёт следующий. | |
| image_26opt | IMAGE | Optional image input 26. Connecting the last slot creates the next one. --- Опциональный вход изображения 26. Подключение к последнему слоту создаёт следующий. | |
| image_27opt | IMAGE | Optional image input 27. Connecting the last slot creates the next one. --- Опциональный вход изображения 27. Подключение к последнему слоту создаёт следующий. | |
| image_28opt | IMAGE | Optional image input 28. Connecting the last slot creates the next one. --- Опциональный вход изображения 28. Подключение к последнему слоту создаёт следующий. | |
| image_29opt | IMAGE | Optional image input 29. Connecting the last slot creates the next one. --- Опциональный вход изображения 29. Подключение к последнему слоту создаёт следующий. | |
| image_30opt | IMAGE | Optional image input 30. Connecting the last slot creates the next one. --- Опциональный вход изображения 30. Подключение к последнему слоту создаёт следующий. | |
| image_31opt | IMAGE | Optional image input 31. Connecting the last slot creates the next one. --- Опциональный вход изображения 31. Подключение к последнему слоту создаёт следующий. | |
| image_32opt | IMAGE | Optional image input 32. Connecting the last slot creates the next one. --- Опциональный вход изображения 32. Подключение к последнему слоту создаёт следующий. | |
| image_33opt | IMAGE | Optional image input 33. Connecting the last slot creates the next one. --- Опциональный вход изображения 33. Подключение к последнему слоту создаёт следующий. | |
| image_34opt | IMAGE | Optional image input 34. Connecting the last slot creates the next one. --- Опциональный вход изображения 34. Подключение к последнему слоту создаёт следующий. | |
| image_35opt | IMAGE | Optional image input 35. Connecting the last slot creates the next one. --- Опциональный вход изображения 35. Подключение к последнему слоту создаёт следующий. | |
| image_36opt | IMAGE | Optional image input 36. Connecting the last slot creates the next one. --- Опциональный вход изображения 36. Подключение к последнему слоту создаёт следующий. | |
| image_37opt | IMAGE | Optional image input 37. Connecting the last slot creates the next one. --- Опциональный вход изображения 37. Подключение к последнему слоту создаёт следующий. | |
| image_38opt | IMAGE | Optional image input 38. Connecting the last slot creates the next one. --- Опциональный вход изображения 38. Подключение к последнему слоту создаёт следующий. | |
| image_39opt | IMAGE | Optional image input 39. Connecting the last slot creates the next one. --- Опциональный вход изображения 39. Подключение к последнему слоту создаёт следующий. | |
| image_40opt | IMAGE | Optional image input 40. Connecting the last slot creates the next one. --- Опциональный вход изображения 40. Подключение к последнему слоту создаёт следующий. | |
| image_41opt | IMAGE | Optional image input 41. Connecting the last slot creates the next one. --- Опциональный вход изображения 41. Подключение к последнему слоту создаёт следующий. | |
| image_42opt | IMAGE | Optional image input 42. Connecting the last slot creates the next one. --- Опциональный вход изображения 42. Подключение к последнему слоту создаёт следующий. | |
| image_43opt | IMAGE | Optional image input 43. Connecting the last slot creates the next one. --- Опциональный вход изображения 43. Подключение к последнему слоту создаёт следующий. | |
| image_44opt | IMAGE | Optional image input 44. Connecting the last slot creates the next one. --- Опциональный вход изображения 44. Подключение к последнему слоту создаёт следующий. | |
| image_45opt | IMAGE | Optional image input 45. Connecting the last slot creates the next one. --- Опциональный вход изображения 45. Подключение к последнему слоту создаёт следующий. | |
| image_46opt | IMAGE | Optional image input 46. Connecting the last slot creates the next one. --- Опциональный вход изображения 46. Подключение к последнему слоту создаёт следующий. | |
| image_47opt | IMAGE | Optional image input 47. Connecting the last slot creates the next one. --- Опциональный вход изображения 47. Подключение к последнему слоту создаёт следующий. | |
| image_48opt | IMAGE | Optional image input 48. Connecting the last slot creates the next one. --- Опциональный вход изображения 48. Подключение к последнему слоту создаёт следующий. | |
| image_49opt | IMAGE | Optional image input 49. Connecting the last slot creates the next one. --- Опциональный вход изображения 49. Подключение к последнему слоту создаёт следующий. | |
| image_50opt | IMAGE | Optional image input 50. Connecting the last slot creates the next one. --- Опциональный вход изображения 50. Подключение к последнему слоту создаёт следующий. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | Images in connection order: batch tensor for uniform sizes or resize modes, list of tensors otherwise; keep mode preserves original sizes. --- Изображения в порядке подключения: батч-тензор при одинаковых размерах или режимах ресайза, иначе список тензоров; режим keep сохраняет исходные размеры. |