diff --git a/docs/NOTE-P2-ENCODE.md b/docs/NOTE-P2-ENCODE.md index 69f93523..76c332ce 100644 --- a/docs/NOTE-P2-ENCODE.md +++ b/docs/NOTE-P2-ENCODE.md @@ -1,6 +1,6 @@ # P2 port note — the VAE encode, from ComfyUI source -Read directly from `/home/dustin/AI/ComfyUI/comfy/ldm/minimax/vae.py` and `audio_vae.py` +Read directly from `/home/main/AI/ComfyUI/comfy/ldm/minimax/vae.py` and `audio_vae.py` (2026-10 install) so the Radiance port is source-faithful rather than doc-derived. Line numbers below are those files'. §5.5 of `PORT-REF2VA.md` scoped the whole of P2 (kernels, graphs, declare, re-convert); this note is the extraction underneath it, and the **host half has diff --git a/docs/NOTE-P3-PACK.md b/docs/NOTE-P3-PACK.md index 620718df..45538c78 100644 --- a/docs/NOTE-P3-PACK.md +++ b/docs/NOTE-P3-PACK.md @@ -1,6 +1,6 @@ # P3/P4 port note — the exact Ref2VA packing, from ComfyUI source -Read directly from `/home/dustin/AI/ComfyUI/comfy/ldm/minimax/model.py` (2026-10 install) so the +Read directly from `/home/main/AI/ComfyUI/comfy/ldm/minimax/model.py` (2026-10 install) so the Radiance port is source-faithful rather than doc-derived. Line numbers below are that file's. Everything here is **pure host arithmetic** — the port is a new TU (proposed `arch/minimaxh3/rad_ref2va_pack.{h,cpp}`, device-free, unit-testable) that emits the segment diff --git a/docs/PORT-REF2VA.md b/docs/PORT-REF2VA.md index 9d6ce056..20ec04b9 100644 --- a/docs/PORT-REF2VA.md +++ b/docs/PORT-REF2VA.md @@ -1,7 +1,7 @@ # PORT-REF2VA — reference-media conditioning for MiniMax-H3 (working brief, community PR) > Scratch planning doc (untracked). Started 2026-10-18 from a ComfyUI-side analysis session -> (`/home/dustin/AI/ComfyUI`). Owner: community contributor on dual Radeon AI PRO R9700 +> (`/home/main/AI/ComfyUI`). Owner: community contributor on dual Radeon AI PRO R9700 > (RDNA4, gfx1201, 32 GB each). Per the author's call for community PRs, this is the > implement/test/PR plan. Nothing here is committed yet. @@ -228,7 +228,7 @@ preferred (quality at 12–15 s), not the turbo path. release if wanted; LoRA as a MERGED container via `rad-convert --lora` (§5.8 — the runtime `core/lora` path is text-generation-only by design; the workflow's ref2va LoRA @1.0 is active and ships as `...-tower-lora.rad`). - **P5 CONVERTED 2026-10-18: `/home/dustin/AI/models/MiniMaxAI/minimax-h3-ref2va-fp8.rad`** + **P5 CONVERTED 2026-10-18: `/home/main/AI/models/MiniMaxAI/minimax-h3-ref2va-fp8.rad`** (60.53 GiB, 2677 tensors — verified a name- and dtype/shape-identical superset of `minimax-h3-fp8.rad` except dit.* VALUES now come from `transformer_ref` (zero drift elsewhere; the finetune is key-identical as §5.1 predicted)). Gotcha found: the author's @@ -281,7 +281,7 @@ preferred (quality at 12–15 s), not the turbo path. execution (§4).** Follow-ups created by the resolutions: (a) HF `transformer_ref/` download — **DONE + -VERIFIED 2026-10-18**: `/home/dustin/AI/models/MiniMaxAI/MiniMax-H3/transformer_ref`, +VERIFIED 2026-10-18**: `/home/main/AI/models/MiniMaxAI/MiniMax-H3/transformer_ref`, 14 shards + index + config, 62 GiB on disk; index holds exactly the 638 base keys (0 diff both directions), shard headers bf16+f32 with the full `[96768,2688]` adaLN Linear, config carries no vsa/gate key. **P5 convert input is ready**; (b) deepstack @@ -328,7 +328,7 @@ timing above 106,016 DiT rows on Radiance's fixed buffers is UNTESTED (§5.3). - Fallback single-file: `Comfy-Org/MiniMax-H3` `minimax_h3_ref2va_bf16.safetensors` (66.28 GB, header-verified) — ComfyUI-flattened names would need the §rename-table; not recommended. -- **Local pre-converted containers** (`/home/dustin/AI/models/StillDeadcode/`, user's +- **Local pre-converted containers** (`/home/main/AI/models/StillDeadcode/`, user's HF pull 2026-10-18): `minimax-h3-fp8/minimax-h3-fp8.rad` (60.5 GiB — this IS the `--reuse` base above) and `fasth3-8-step-v2-fp8/fasth3-8-step-v2-fp8.rad` (62.3 GiB, FastVideo 8-step distilled path). Name-table string-scan of both (2393 tensors each): @@ -361,7 +361,7 @@ ComfyUI side confirmed: audios **never** enter the TE as tokens (label-only workflows run `qwen3vl_32b_h3_ultra_uncensored_heretic` (llmfan46 fine-tune of Qwen3-VL-32B-Instruct). The int8-convrot copy CANNOT be ingested (rad-convert refuses convrot, `docs/TOOLS.md:183`), but the **bf16 source is already on local disk**: -`/home/dustin/AI/ComfyUI/models/text_encoders/civitai-minimax/qwen3vl_32b_h3_ultra_uncensored_heretic_bf16.safetensors` +`/home/main/AI/ComfyUI/models/text_encoders/civitai-minimax/qwen3vl_32b_h3_ultra_uncensored_heretic_bf16.safetensors` (48.0 GiB, 902 bf16 tensors, header-verified): `model.embed_tokens` (5120-dim = H3 `text_dim`), exactly 50 language layers, **no `lm_head`, no final norm** (`__metadata__` documents `minimax_h3_language_layers: 50` / `minimax_h3_final_norm: false` — same @@ -994,7 +994,7 @@ VAE/TP; decoders `:1226-1328,1344-1539`, `map_wnorm :1172`), `libr4d/r4d_vsa.hip `vtile_gather/stitch`), `docs/TP3.md`/`TP4.md`, `spec.md:523,552-553,635-637` (quant grammar), `engine_bringup.cpp:920-960` (build-time `max_tok`). -ComfyUI (`/home/dustin/AI/ComfyUI`): `comfy_extras/nodes_minimax_h3.py:243-364` (the +ComfyUI (`/home/main/AI/ComfyUI`): `comfy_extras/nodes_minimax_h3.py:243-364` (the port spec), `comfy/ldm/minimax/model.py:406-434,463,596-599,680-681,711` (pack/segments/ seg_tag/timesteps), `comfy/model_detection.py:415` (gate_compress detection), `comfy_extras/nodes_sparse_attention.py` (sink rules, `minimax_h3_layout`, diff --git a/tests/data/ref2va/ref_aenc_parity.py b/tests/data/ref2va/ref_aenc_parity.py index 42de4a7e..dd1f4e74 100644 --- a/tests/data/ref2va/ref_aenc_parity.py +++ b/tests/data/ref2va/ref_aenc_parity.py @@ -36,7 +36,7 @@ import math import os import sys -sys.path.insert(0, os.environ.get("COMFYUI_HOME", "/home/dustin/AI/ComfyUI")) +sys.path.insert(0, os.environ.get("COMFYUI_HOME", "/home/main/AI/ComfyUI")) # Force ComfyUI's import-time device probe onto the CPU branch WITHOUT opening a ROCm context # (the running TP2 server owns both GPUs). comfy.cli_args exposes a module-level `args`; @@ -57,7 +57,7 @@ ENC_MAX_SAMPLES = 500000 SLOT_ROWS_A = AUDIO_CH * (ENC_MAX_SAMPLES // AUDIO_HOP) # 1250 MAXA = SLOT_ROWS_A // AUDIO_CH # per-channel row stride within a slot (625) VAE_SAFETENSORS = os.path.join( - os.environ.get("COMFYUI_HOME", "/home/dustin/AI/ComfyUI"), + os.environ.get("COMFYUI_HOME", "/home/main/AI/ComfyUI"), "models/vae/minimax_h3_audio_vae_fp32.safetensors") diff --git a/tests/data/ref2va/ref_venc_parity.py b/tests/data/ref2va/ref_venc_parity.py index dee2e3ea..ae20e2a1 100644 --- a/tests/data/ref2va/ref_venc_parity.py +++ b/tests/data/ref2va/ref_venc_parity.py @@ -37,7 +37,7 @@ Layout it relies on (from arch/minimaxh3/minimaxh3.cpp + rad_vae_geom.h, keep in enc_geom (25 i32) : g0=(clipT,H,W) -> gd[1]=H, gd[2]=W ; gd[18]=short_last ; gd[22]=n_clips ; gd[23]=T_pad. Run under the ComfyUI torch venv (only for numpy/torch/safetensors — no comfy import): - COMFYUI_HOME=/home/dustin/AI/ComfyUI /home/dustin/AI/ComfyUI/.venv/bin/python \ + COMFYUI_HOME=/home/main/AI/ComfyUI /home/main/AI/ComfyUI/.venv/bin/python \ ref_venc_parity.py --evc evc.f32 --encpx encpx_1_1.f32 --encg encg_1_1.f32 --slot 1 # or validate the harness itself with no device at all: ref_venc_parity.py --selftest @@ -54,7 +54,7 @@ import torch import torch.nn as nn import torch.nn.functional as F -COMFYUI = os.environ.get("COMFYUI_HOME", "/home/dustin/AI/ComfyUI") +COMFYUI = os.environ.get("COMFYUI_HOME", "/home/main/AI/ComfyUI") VAE_PY = os.path.join(COMFYUI, "comfy/ldm/minimax/vae.py") VAE_SAFETENSORS = os.path.join(COMFYUI, "models/vae/minimax_h3_video_vae_fp16.safetensors") diff --git a/tests/data/vae_geom/ref_audio_sensitivity.py b/tests/data/vae_geom/ref_audio_sensitivity.py index b2b982a5..bf944950 100644 --- a/tests/data/vae_geom/ref_audio_sensitivity.py +++ b/tests/data/vae_geom/ref_audio_sensitivity.py @@ -42,9 +42,9 @@ import torch.nn.functional as F torch.manual_seed(0) VAE_PY = sys.argv[1] if len(sys.argv) > 1 else \ - "/home/dustin/AI/ComfyUI/comfy/ldm/minimax/audio_vae.py" + "/home/main/AI/ComfyUI/comfy/ldm/minimax/audio_vae.py" WEIGHTS = sys.argv[2] if len(sys.argv) > 2 else \ - "/home/dustin/AI/models/MiniMaxAI/MiniMax-H3/audio_vae/diffusion_pytorch_model.safetensors" + "/home/main/AI/models/MiniMaxAI/MiniMax-H3/audio_vae/diffusion_pytorch_model.safetensors" # ---- minimal comfy.ops shim (same discipline as gen_golden.py: CPU path only) ----