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

MinusZone - HYDiTDatasetConfig

Feed it images once, let it skip the reruns

By MinusZoneAI·Created 2 years ago·Updated 5 months ago· 67
MinusZone - HYDiTDatasetConfig
  • workspace_config
  • images
  • workspace_images_dir
resolution1024
force_cleardisable
force_clear_only_imagesdisable
same_caption_generatedisable
same_caption

MZ_HYDiTDatasetConfig is the dataset step for the pack's native Hunyuan DiT training path - and it's notably lazier than its kohya-family cousin. Here images is an optional input: if you don't wire images in, the node assumes data already exists in the workspace's train_images/ folder and just skips straight to optional caption handling. That makes it a much more forgiving node to rerun, and it's the natural fit for the "build your dataset once, tweak the training config forever" rhythm.

The native Hunyuan DiT trainer (MZ_HYDiTTrain) actually builds its own image_text.csv from whatever is in train_images/, so this node's real job is narrower than the kohya dataset node: get images into the folder, resize them to your target resolution, and optionally stamp captions. No dataset.json/toml generation here - the native repo does data differently.

Inputs that matter

  • workspace_config - from MZ_HYDiTInitWorkspace. Type matters: it must be the native MZ_TT_HYDiT_WorkspaceConfig, not the kohya one.
  • images (optional) - the training images. Leave unwired on re-runs to reuse what's already in train_images/. The node logs "no images detected, assuming existing training data" and skips ahead.
  • resolution (default 1024) - the long-side resize target when images are provided.
  • force_clear / force_clear_only_images - nuke the whole dataset folder, or just the image files, before copying. If you re-run with a new image set and forget these, stale images pollute the run - the same trap as the kohya dataset node.
  • same_caption_generate + same_caption - write the same caption file for every image. The native path reads captions from .txt or .caption files next to each image when building its CSV.

Output is workspace_images_dir (a STRING path) - wire it into MZ_HYDiTTrain's optional workspace_images_dir input so the trainer knows where the data lives (it falls back to the standard train_images/ path if you don't).

Install & troubleshooting

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

The pairing to remember: this node's config type is MZ_TT_HYDiT_WorkspaceConfig, so it belongs with MZ_HYDiTInitWorkspace and MZ_HYDiTTrain. Pair it with the kohya init by mistake and you get a hard type error. Also note this node does not take conditioning_images - the native path is LoRA training only; if you want Hunyuan ControlNet work, that's not what this family does. And a heads-up for dataset quality that applies double here: the KB's training doc hammers that diverse backgrounds beat clean ones, and the native CSV path uses whatever captions you leave lying next to images - so caption deliberately, or same_caption everything and caption for real later.

CategoryMinusZone - TrainTools/HYDiT_native

Inputs (7)

NameTypeDefaultDescription
workspace_configMZ_TT_HYDiT_WorkspaceConfig
resolutionINT1024
force_clearCOMBOdisable2 options: enable, disable
force_clear_only_imagesCOMBOdisable2 options: enable, disable
same_caption_generateCOMBOdisable2 options: enable, disable
same_captionSTRING
imagesoptIMAGE

Outputs (1)

NameTypeDescription
workspace_images_dirSTRING