"""Generate StarNodes converter profiles for MiniMax-H3 from the bf16 safetensors header. Two variants: minimax_h3_nvfp4_mixed.json - AdaLN kept at FP8, attn/mlp at NVFP4 (recommended) minimax_h3_nvfp4_full.json - everything incl. AdaLN at NVFP4 (aggressive) Kept at BF16 in both: all biases, all norms, rope freqs, patch/time/condition embedders and the final output heads (~0.04B params total, 0.1% of the model). """ import json, struct, sys, os, datetime SRC = "/workspace/ComfyUI/models/diffusion_models/minimax_h3_ref2va_bf16.safetensors" OUT_DIR = "/workspace/ComfyUI/custom_nodes/comfyui-starnodes-modelconverter/profiles" with open(SRC, "rb") as f: n = struct.unpack(" {path}") build("FP8_E4M3FN + SCALE", "minimax_h3_nvfp4_mixed") build("NVFP4", "minimax_h3_nvfp4_full")