Nodes/Arthemy Live Tuner - Z-image/Arthemy Tuner Model Loader
ComfyUI Node

Arthemy Tuner Model Loader

The loader that stops Z-Image tuning from 'frying' your cached model

By aledelpho·Created 7 months ago·Updated 7 months ago· 15
Arthemy Tuner Model Loader
    • MODEL
    unet_name
    mode_lock
    weight_dtype

    If your Z-Image output quietly drifts between runs - or looks deep-fried by the second queue - you've just met the problem this node exists to kill. ComfyUI caches models in RAM so you don't reload a 12GB file every time you hit Queue. That's great for speed and terrible for live weight tuning, because the Arthemy Z-Image tuners edit weights in place. Run the workflow twice and the second run tunes weights that were already tuned. The dirty cache accumulates, and your images degrade or blow out.

    Arthemy Tuner Model Loader is a drop-in replacement for UNETLoader that forces a clean, from-disk reload on every single execution. Every tuning session starts from the pristine original file. That's its entire job, and it does it well.

    How it forces the refresh

    The trick lives in the node's IS_CHANGED method, which returns NaN. ComfyUI treats a node whose output counts as "changed" as something it must re-execute even when none of the inputs moved. So instead of handing back the cached model, the loader calls comfy.sd.load_unet() and reads the file fresh. The mode_lock input - a single locked value, 🔒 REFRESH_SAME_MODEL - doesn't actually switch anything; it's a trigger that makes the reload behaviour explicit and logs it. If you're wondering why a one-choice dropdown exists, that's why.

    The inputs that matter

    Only three, and one of them is decorative:

    • unet_name - a dropdown of the .safetensors files in ComfyUI/models/unet/. Point it at your Z-Image Base or Z-Image Turbo file.
    • mode_lock - the locked 🔒 REFRESH_SAME_MODEL value. Not a setting you change.
    • weight_dtype - default, fp8_e4m3fn, or fp8_e5m2. This casts the whole UNet to FP8 at load time to squeeze VRAM. default keeps the file's native precision; the FP8 options trade a little output quality for memory, which can matter on a 12GB card.

    The single output is a MODEL, wired straight into ArthemyZImage_Tuner_Simple or ArthemyZImage_Tuner_Lab.

    Wiring it up

    ArthemyTunerLoader ──> ArthemyZImage_Tuner_Simple ──> KSampler ──> VAE Decode ──> SaveImage
                              └──────────────────────────────> ArthemyZImage_Saver   (optional)
    

    The pack ships a ready-made example workflow (Workflows/Z-image_arthemy_tuner.json) that shows the whole chain, including a CLIPLoader for the Qwen text encoder and a ModelSamplingAuraFlow node - the shift tweak people run for Turbo.

    Install

    Grab it through ComfyUI Manager (search "Arthemy Live Tuner - Z-image") or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/aledelpho/Arthemy_Live-Tuner-ZIT-ComfyUI
    

    Then restart ComfyUI. There are no Python dependencies - requirements.txt is empty and the pyproject lists none - so no pip drama.

    One honest gotcha: the README's install section still points at an old repo name (ComfyUI-Arthemy-ZImage-Tuner.git) that now returns a 404. Clone the repo above instead.

    Common issues

    • Forgot the loader and fed the tuner from a plain UNETLoader - this is the number one cause of "why is my second run garbage." The tuners mutate weights in place, so without the forced refresh you're compounding edits. This loader is the fix, not a nicety.
    • FP8 output looks different - that's the quantization doing its thing, not the tuner. Go back to default if you have the VRAM.
    • The Qwen side doesn't need this node. ArthemyQwenTunerSimple and ArthemyQwenTunerLab use ComfyUI's non-destructive patch system (lazy evaluation), so they can't dirty a cache the same way. The loader exists purely because Z-Image tuning is in-place surgery.

    One more thing: because this loader reloads on every execution, it's a little slower than a cached load. That's the price of a guaranteed clean slate - and for a 6B model that takes seconds, it's the right trade.

    CategoryArthemy/Loaders

    Inputs (3)

    NameTypeDefaultDescription
    unet_nameCOMBO0 options:
    mode_lockCOMBO1 options: 🔒 REFRESH_SAME_MODEL
    weight_dtypeCOMBO3 options: default, fp8_e4m3fn, fp8_e5m2

    Outputs (1)

    NameTypeDescription
    MODELMODEL