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

MinusZone - KohyaSS_KohakuBlueleaf_HYHiDInitWorkspace

The Hunyuan DiT workspace starter that clones KohakuBlueleaf's fork instead

By MinusZoneAI·Created 2 years ago·Updated 5 months ago· 67
MinusZone - KohyaSS_KohakuBlueleaf_HYHiDInitWorkspace
    • workspace_config
    lora_name
    branch0dc79edc01f2000de1dad5ad6d20d8b099bfafe2
    sourcegithub
    seed0

    This is the InitWorkspace node for the pack's KohakuBlueleaf Hunyuan DiT path - the one that made the pack's big July 2024 addition possible. It looks identical to MZ_KohyaSSInitWorkspace (same inputs, same workspace_config output), but it clones a different repo: KohakuBlueleaf/sd-scripts checked out at the HunYuanDiT branch, stored under the pack's tool dir as KohakuBlueleaf_kohya_ss_lora. That fork is what turns sd-scripts into a Hunyuan DiT LoRA trainer.

    Why Hunyuan DiT at all? It's the model that got lost. The KB's forgotten-models doc is blunt: Tencent's open-source DiT image model launched in mid-2024 with real buzz (a +352 release thread), got Kohya/webui support, then vanished a few weeks later when Flux dropped. The same Tencent org's video model went on to dominate; the image model stayed a footnote. This pack keeps it alive as a trainable niche - the fork's LoRA support was actually the community signal that the model was worth training on at all.

    How it works

    Same bootstrap dance as the regular InitWorkspace: git clone --depth 1 the fork at a pinned commit into ComfyUI/models/minus_zone_models/train_tools/, create the workspace under ComfyUI/output/mz_train_workspaces/<lora_name>/, and return a workspace_config (type MZ_TT_SS_WorkspaceConfig - same type as the SD path, so the same dataset nodes work downstream).

    Inputs are the familiar four:

    • lora_name - workspace folder name; required, must be non-empty.
    • branch - the pinned commit of the KohakuBlueleaf fork. Default is the commit the author tested; leave it alone unless you know why.
    • source - github or the githubfast / 521github / kkgithub mirrors. First clone failing? Switch and rerun; the node only clones when the folder isn't already a repo.
    • seed - carried along for sample generation downstream.

    Install & troubleshooting

    Same pack install either way:

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

    Or ComfyUI Manager → search ComfyUI-TrainTools-MZ.

    Watch for the gotcha that trips people up: the workspace config type here is the kohya one (MZ_TT_SS_WorkspaceConfig), not the native HYDiT one (MZ_TT_HYDiT_WorkspaceConfig). That means it wires into the kohya-style dataset node (MZ_KohyaSSDatasetConfig), not MZ_HYDiTDatasetConfig. Mixing the two families is the classic way to get a type error mid-graph. First run clones the fork and takes a minute - then your Hunyuan DiT LoRA training is one dataset-copy and one train node away.

    CategoryMinusZone - TrainTools/kohya_ss_HYDiT_kohakublueleaf

    Inputs (4)

    NameTypeDefaultDescription
    lora_nameSTRING
    branchSTRING0dc79edc01f2000de1dad5ad6d20d8b099bfafe2
    sourceCOMBOgithub4 options: github, githubfast, 521github, kkgithub
    seedINT0

    Outputs (1)

    NameTypeDescription
    workspace_configMZ_TT_SS_WorkspaceConfig