Batch Resize Image for SDXL (Mikey)
Batch Resize Image for SDXL (Mikey Nodes) — resize a whole folder in one node
- image
If you've got a folder of source images for an img2img batch, a LoRA training set, or just a pile of reference photos, resizing each one by hand before it hits SDXL is tedious and error-prone. This node does the whole folder in one pass, straight to SDXL's native pixel budget.
What it does
Straight from the README: point it at a folder, and it resizes every image in that folder to fit inside 1024x1024 resolution, then feeds the whole batch into your workflow as a single IMAGE output. SDXL was trained at 1024x1024 and a handful of nearby aspect ratios - feed it wildly off-resolution images and you tend to get the classic stretched-anatomy artifacts the model wasn't trained to handle, so getting your source images into that budget before they hit img2img or ControlNet preprocessing genuinely matters, not just for VRAM's sake.
The README's own warning is worth repeating verbatim: "Careful of folders with lots of images!" This node loads and resizes everything in the target directory in one go - point it at a folder with a few thousand images and you'll be waiting a while, and using a lot of RAM in the meantime.
The inputs that matter
image_directory- the folder path to process. No subfolder recursion built into this node (that's what its sibling, Batch Load Images, offers as an option) - this one works on the files directly inside the path you give it.upscale_method- four choices:nearest-exact,bilinear,area,bicubic. For photographic source images,bicubicorareagenerally hold detail better thannearest-exact, which is closer to a pixel-art-preserving mode.crop-disabledorcenter. Withdisabled, images that don't match the target aspect ratio get squashed to fit;centercrops instead, trimming the edges to preserve the original proportions of the center of the frame.
One output: image, and it's a list (is_list: true) - every image in the folder comes out as a batch, ready to wire into a VAE Encode, a ControlNet preprocessor, or straight into an img2img sampler.
Installing
Bundled with the full pack - ComfyUI Manager, search "Mikey Nodes," install, restart, or cd ComfyUI/custom_nodes && git clone https://github.com/bash-j/mikey_nodes and restart manually. No extra models needed for this specific node; it's pure image resizing, no ML involved.
Where it bites people
- Running out of memory on large folders. This is the README's own caveat, and it's the most common real complaint with any "load a whole folder at once" node - start with a small test folder before pointing it at your full dataset, especially on a machine with limited RAM.
- Squashed-looking results. If your source images are landscape photos and you're using
crop: disabled, expect visible distortion on anything that isn't already close to square. Switch tocentercrop if preserving natural proportions matters more than keeping every pixel of the original frame. - Confusing this with a general-purpose batch loader. This node resizes and loads in one step specifically for SDXL's 1024² budget - if you just want raw images from a folder without the SDXL-specific resize, use Mikey Nodes' plain Batch Load Images node instead.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image_directory | STRING | — | |
| upscale_method | COMBO | 4 options: nearest-exact, bilinear, area, bicubic | |
| crop | COMBO | 2 options: disabled, center |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |