Batch Crop Resize Inplace (Mikey)
Clean up a whole dataset folder on disk, no image outputs
- job_done
This node looks similar to Batch Crop Image at a glance - both work on a directory of images - but it's actually a different kind of node entirely. Batch Crop Image reads files in and hands you back image tensors to keep working with inside ComfyUI. Batch Crop Resize Inplace writes results straight back to disk. There's no image tensor output here at all, just a job_done string once it's finished. It's a filesystem operation dressed up as a ComfyUI node, useful for exactly one thing: bulk-cleaning a folder of training or reference images before you use them somewhere else, without routing every file through the rest of your graph.
That makes it a solid pre-processing step ahead of a LoRA training run, where you often want a whole folder cropped and resized to consistent dimensions and don't need ComfyUI to actually generate anything with the results - you just need the files on disk to end up right.
The inputs that matter: image_directory is your source folder. subdirectories (true/false) controls whether it recurses into subfolders or only touches files directly inside the given path. replace_original (true/false) is the big one - set true and it overwrites your source files in place; set false and it writes new files instead, using replace_suffix (default _cropped_resized) appended to the filename so the originals stay untouched. upscale_method gives you the standard resize interpolation choices (nearest-exact, bilinear, area, bicubic). crop is an enable/disable toggle (disabled or center) for whether cropping happens at all, and crop_amount sets how much gets trimmed when crop is set to center. The single output, job_done, is just a string confirming the run finished - there's nothing to chain into a normal image pipeline from this node.
Installing it
Comes with the full Mikey Nodes pack. Through ComfyUI Manager, search "Mikey Nodes." Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/bash-j/mikey_nodes
Restart ComfyUI. No models or external dependencies needed - it's file I/O and standard image resizing.
Common issues
The one thing to genuinely be careful with: replace_original set to true is destructive and there's no undo. If you're pointing this at a folder of images you can't easily re-download or re-generate, back it up first, or run with replace_original set to false and check the _cropped_resized output files before you trust the node enough to overwrite originals. Test on a small copy of your dataset before running it against the real thing - the same "careful with large folders" caution the README gives for the pack's other batch-image nodes applies here too, and doubly so once file overwriting is in play.
Also worth noting: crop_amount only does anything if crop is set to center - leaving crop on disabled while still setting a nonzero crop_amount won't crop anything, since the toggle gates whether cropping happens at all. If you expected a crop and didn't get one, that's the first thing to check.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image_directory | STRING | — | |
| subdirectories | COMBO | false | 2 options: true, false |
| replace_original | COMBO | false | 2 options: true, false |
| replace_suffix | STRING | _cropped_resized | — |
| upscale_method | COMBO | 4 options: nearest-exact, bilinear, area, bicubic | |
| crop | COMBO | 2 options: disabled, center | |
| crop_amount | FLOAT | 0.05 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| job_done | STRING | — |