Nodes/ComfyUI-TrainTools-MZ/MinusZone - ImagesCopyWorkspace
ComfyUI Node

MinusZone - ImagesCopyWorkspace

The dataset copier that's secretly the same node as KohyaSSDatasetConfig

By MinusZoneAI·Created 2 years ago·Updated 5 months ago· 67
MinusZone - ImagesCopyWorkspace
  • workspace_config
  • images
  • conditioning_images
  • workspace_images_dir
enable_bucketenable
resolution1024
num_repeats1
caption_extension.caption
batch_size1
force_cleardisable
force_clear_only_imagesdisable
same_caption_generatedisable
same_caption
image_formatwebp
dataset_config_extension.json

Here's a confusing thing about this pack: MZ_ImagesCopyWorkspace and MZ_KohyaSSDatasetConfig are the same node. The pack registers one class under both names - the older display name and the newer one. So if a workflow you downloaded uses this and a tutorial uses the other, you're looking at identical behavior. Don't reinstall anything; just pick whichever shows up in your node search.

The job is straightforward: copy a ComfyUI IMAGE batch into the training workspace and build the dataset config for it. The README calls it "copy images to the training folder and some dataset configurations," which undersells it slightly - it also handles resizing, optional ControlNet conditioning images, and a same-caption fallback.

How it works

Feed it the workspace_config from MZ_KohyaSSInitWorkspace and an IMAGE batch. Each image gets resized to resolution (default 1024, max dimension), saved into the workspace's train_images/ folder with an md5-derived filename, and the node writes the dataset file kohya will consume. If you pass conditioning_images, they're resized to match and dropped into a parallel conditioning_images/ folder with matching names - that's the ControlNet path. Output is workspace_images_dir (a STRING path to where the data now lives).

Inputs worth touching

  • images - your training set as a batch. The README explicitly suggests the upload-folder node from ComfyUI-VideoHelperSuite to get images in without burning VRAM loading them all at once.
  • conditioning_images - only for ControlNet training. Preprocessed inputs, same count and order as images.
  • enable_bucket - leave on unless you have a reason; bucketing is standard now.
  • same_caption_generate + same_caption - stamp one caption on every image. Handy placeholder before a real captioning pass.
  • force_clear vs force_clear_only_images - the difference between nuking the whole dataset folder and just clearing image files. Worth knowing if you re-run with a new image set: left off, stale images stay and silently pollute your dataset.

Install and gotchas

Same as the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ
# restart ComfyUI

Or ComfyUI Manager → search ComfyUI-TrainTools-MZ.

The recurring trap is re-running the graph after changing images: if you don't enable force_clear, old images sit next to new ones and your LoRA learns a mix. Second trap: default image_format is webp - fine on a normal install, but if your save step later errors with a format complaint, switch to png and rerun. The node is also the controlnet gate: if you set a controlnet template in the train node but never wired conditioning_images, training will happily start and then fail or produce garbage - the two must go together.

CategoryMinusZone - TrainTools/kohya_ss

Inputs (14)

NameTypeDefaultDescription
workspace_configMZ_TT_SS_WorkspaceConfig
imagesIMAGE
enable_bucketCOMBOenable2 options: enable, disable
resolutionINT1024
num_repeatsINT1
caption_extensionCOMBO.caption2 options: .caption, .txt
batch_sizeINT1
force_clearCOMBOdisable2 options: enable, disable
force_clear_only_imagesCOMBOdisable2 options: enable, disable
same_caption_generateCOMBOdisable2 options: enable, disable
same_captionSTRING
image_formatCOMBOwebp3 options: png, jpg, webp
dataset_config_extensionCOMBO.json2 options: .toml, .json
conditioning_imagesoptIMAGE

Outputs (1)

NameTypeDescription
workspace_images_dirSTRING