Nodes/ComfyUI-HSWQ-Loader-and-Tools/HSWQ ControlNet Loader (ConvRot INT8)
ComfyUI Node

HSWQ ControlNet Loader (ConvRot INT8)

The ControlNet Loader That Won't Panic at an INT8 Checkpoint

By ussoewwin·Created 9 months ago·Updated about 23 hours ago· 17
HSWQ ControlNet Loader (ConvRot INT8)
    • control_net
    control_net_name

    ComfyUI's stock ControlNet loader has a blind spot: hand it an INT8-quantized ControlNet and it dies with Only Tensors of floating point and complex dtype can require gradients. That's because the built-in path tries to build the model graph in whatever dtype the checkpoint claims - torch.int8 - and PyTorch refuses to make int8 tensors require gradients. The HSWQ ControlNet Loader exists to fix exactly that one failure. It's the drop-in replacement you swap in when someone hands you a ConvRot INT8 ControlNet (the README names Qwen Image Fun ControlNet) and your graph starts throwing that error.

    Why this is a thing at all

    Quantization stopped being a UNet-only concern. ConvRot INT8 is the format that rotated its way into ComfyUI natively in v0.27.0 (July 2026) because it holds better quality than fp8 while running on 20/30-series cards that have zero fp8 acceleration. Model loaders got the treatment. ControlNets lagged: the stock controlnet_load_state_dict path doesn't understand comfy_quant metadata, so an INT8 ControlNet that a modern UNet would chew through fine still melts the loader. That gap is this node's entire reason for existing.

    How it works

    The fix is two moves, and both matter. First it forces the module graph to build in bfloat16, sidestepping the gradient crash. Second it injects ComfyUI's MixedPrecisionOps configured for int8_tensorwise, so every Linear is a quant-aware op that reads the checkpoint's comfy_quant / weight_scale metadata and keeps the weights as an INT8 QuantizedTensor (TensorWiseINT8Layout) in VRAM. The 8-bit file stays 8-bit in memory - that's where the VRAM savings live - and forward passes run through ComfyUI's int8_linear kernel with online activation rotation for the ConvRot layers.

    There's also a special case worth knowing: FLUX-layout ControlNets (the img_in / pos_embed_input / controlnet_blocks shape) aren't recognized by stock detection at all, so the node builds those directly. If a file has no INT8 layers, it just delegates to the stock loader and behaves like a perfectly ordinary ControlNet loader. No switches, no mode flags.

    The one input and the one output

    • control_net_name - the only input. An enum dropdown fed by everything in ComfyUI/models/controlnet. The tooltip says it all: "ConvRot INT8 / standard ControlNet model (.safetensors)". Drop your file there.
    • CONTROL_NET - the output. Wire it straight into the stock Apply ControlNet node and continue as if nothing happened.

    That's the entire surface. It's deliberately boring, which is the point of a drop-in.

    Install

    ComfyUI Manager (search "HSWQ" or ComfyUI-HSWQ-Loader-and-Tools), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ussoewwin/ComfyUI-HSWQ-Loader-and-Tools
    

    Restart ComfyUI and it'll appear under Loaders. The pack's requirements.txt is a monster (transformers, diffusers, insightface, opencv, onnxruntime, timm…) but none of that is needed for this node - it runs off ComfyUI core's quant ops. What you do need is a reasonably recent ComfyUI, since the node leans on the MixedPrecisionOps / INT8 path that landed with native ConvRot support. Update ComfyUI, not your patience.

    Common issues

    • The gradient error - you're feeding an INT8 ControlNet to the stock loader. Swap it for this node and the crash goes away. That's the node's one job.
    • "Failed to detect controlnet in X" - the file isn't a ControlNet this node recognizes. Wrong folder, wrong weights, or a layout it can't sniff. Double-check it's a .safetensors ControlNet in models/controlnet.
    • Empty dropdown - the file lives in models/checkpoints instead. Move it.
    • "Where do I even get an INT8 ControlNet?" - fair question. You usually convert one yourself with the upstream HSWQ quantization scripts, or grab a published conversion. Don't have one? The node is still safe to use - it falls back to stock loading and behaves identically to the built-in node.

    One quirk: the pack registers this class twice. HSWQLoadConvRotINT8ControlNet is an alias of this exact same class (same title, same behavior), kept so old saved workflows don't break. Grab this one when you're adding nodes fresh.

    Categoryloaders

    Inputs (1)

    NameTypeDefaultDescription
    control_net_nameCOMBOConvRot INT8 / standard ControlNet model (.safetensors)

    Outputs (1)

    NameTypeDescription
    control_netCONTROL_NET