code wiki / (root) / nx_gen_modelid.nx

nx_gen_modelid.nx

buildroot/runtime/nx_gen_modelid.nx

3954 B99 linesdepth 9pulls 21 transitivereach 0 importersview sourcekind tooltopic gen
docsdependenciesstructsconstsfunctions

about

nx_gen_modelid.nx -- identify ANY model file: container, family, role. The front door of a hot-swappable pipeline. Operator 2026-08-07: *"when i use krea or something else it needs to have comfyui capabilities without its messy interface"*. ComfyUI's real capability is not its node graph -- it is that you can drop in an arbitrary set of parts and it knows what they are and how they wire. The UI is the part worth leaving behind. So: point this at a file and it answers "what IS this", by probing TENSOR NAMES. Names are the only honest signature -- the installed zoo already proves why: * a `.safetensors` DiT can be Z-Image or FLUX (Realism_Engine_Klein_V2 is Flux) * a `.gguf` can be a DiT or a text-encoder LLM * one file can be 453 tensors or 789 and still be the same family ★ FILENAME AND EXTENSION ARE CLAIMS; THE TENSOR NAMES ARE EVIDENCE. It REFUSES to guess. An unknown file is reported UNKNOWN, never defaulted to the family we happen to support -- a wrong family runs to completion and produces a wrong picture. Usage: nx_gen_modelid <model_file> license_tier: ORIGINAL

dependencies 11 imports · 0 importers

nx_syscalls.nx nx_le.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_f16.nx nx_strconv.nx nx_genver.nx nx_genweights.nx nx_genarch.nx nx_gen_modelid.nx

diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_le.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f16.nxnx_strconv.nxnx_genver.nxnx_genweights.nxnx_genarch.nxnx_genrole.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main mi_puts sys_write nx_gw_open sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_map_file sys_openat_rd sys_lseek sys_close stl_header_len stl_u64le stl_data_start stl_u64le ↻ nx_gguf_parse nx_le_read_u32 nx_le_read_u64 nx_le_read_u32 ↻ _gguf_skip_value nx_le_read_u64 ↻ nx_le_read_u32 ↻ _gguf_skip_value ↻ sys_mmap ↻ nx_genver_emit sys_mmap ↻ nx_strconv_format_i64 sys_write ↻

structs

none

consts

none

functions

34func mi_puts(s: *u8) -> i64
called by 1: main calls 1: sys_write
39func mi_len(s: *u8) -> i64
called by 1: mi_has
44func mi_has(gw: *i64, name: *u8) -> i64
49func main(argc: i64, argv: *i64) -> i64