code wiki / (root) / nx_genpipe.nx

nx_genpipe.nx

buildroot/runtime/nx_genpipe.nx

10644 B229 linesdepth 9pulls 20 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_genpipe.nx -- a DECLARED generation pipeline: parse it, then prove every claim against the files themselves. Operator 2026-08-07: *"z image turbo is the mix of all the parts, we dont need to break those parts apart just make sure that they are hot swappable with other models"* and *"when i use krea or something else it needs to have comfyui capabilities without its messy interface"*. ⇒ THE UNIT OF SWAP IS THE WHOLE PIPELINE, NOT THE DiT. Swapping only the DiT and keeping "the" text encoder assumes every family shares one -- they do not, and a mismatched encoder produces a picture rather than an error. So a pipeline names ALL its parts together and is swapped whole. ★★★★★ THE DESCRIPTOR IS A CLAIM; THE FILE IS THE EVIDENCE. Every declared role is verified by probing the container's tensor names (nx_genrole), and a mismatch is a REFUSAL. This is the same law that cost the estate elsewhere: a self-declared status is a comment, not a measurement. Format -- key TAB value, '#' comments, order irrelevant: pipeline zimage_turbo family z-image text_encoder /path/qwen2.5-vl-7b-instruct-q8_0.gguf dit /path/zimage_turbo_nsfw_2602-Q8_0.gguf vae_decoder /path/taesd.safetensors adapter /path/loras/z_real_v1.safetensors 1000 # multiplier in milli steps 8 cfg_milli 1000 cap negative_prompt license_tier: ORIGINAL

dependencies 10 imports · 1 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_genweights.nx nx_genarch.nx nx_genrole.nx nx_genpipe.nx nx_gen_pipecheck.nx

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

imported by: nx_gen_pipecheck.nx

structs

none

consts

38const PIPE_MAGIC_262144: i64 = 262144
40const PIPE_MAX_ADAPTERS: i64 = 16
41const PIPE_MAX_CAPS: i64 = 16
44const PP_NAME: i64 = 0
45const PP_FAMILY: i64 = 1 // FAM_* code
46const PP_TEXTENC: i64 = 2 // *u8 path or 0
47const PP_DIT: i64 = 3
48const PP_VAEDEC: i64 = 4
49const PP_STEPS: i64 = 5
50const PP_CFG_MIL: i64 = 6
51const PP_N_ADAPT: i64 = 7
52const PP_N_CAPS: i64 = 8
53const PP_VAE_EXT: i64 = 9 // vae the EXTERNAL engine reads (see below)
54const PP_SAMPLER: i64 = 10
55const PP_NEGFILE: i64 = 11
56const PP_ADAPT0: i64 = 16 // 2 slots each: path, multiplier_milli
57const PP_CAP0: i64 = 48 // 1 slot each: *u8
58const PP_SLOTS: i64 = 72

functions

60func _pp_len(s: *u8) -> i64 {
65func _pp_eq(a: *u8, b: *u8) -> i64 {
74func _pp_family_code(s: *u8) -> i64 {
called by 1: nx_pipe_parse calls 1: _pp_eq
86func nx_pipe_parse(path: *u8, pp: *i64) -> i64 {
222func nx_pipe_has_cap(pp: *i64, want: *u8) -> i64 {
called by 1: main calls 1: _pp_eq