code wiki / _hdl_build / nx_gen_pipeline.nx

nx_gen_pipeline.nx

buildroot/runtime/_hdl_build/nx_gen_pipeline.nx

10679 B257 linesdepth 7pulls 11 transitivereach 9 importersview sourcekind librarytopic gen
docsdependenciesstructsconstsfunctions

about

nx_gen_pipeline.nx -- the sovereign GENERATE pipeline core (the gen-img logic, off Docker). Given a GPU-worker response body {"images":["<base64 png>",...]}, for each image it: decode base64 -> inject GENREC tEXt (nx_png_textw) -> ingest factors (nx_store_ingest, R1) -> save the PNG bytes to a content-addressed blob file -> append the CID->path sidecar the gallery serves /img/<cid> from. Seeds increment per image (seed0, seed0+1, ...) like the old batch path. Pure logic core (no sockets/HTTP) so it gates offline by feeding a synthetic response. The HTTP daemon nx_gen_orchestrator wraps this. license_tier: ORIGINAL

dependencies 3 imports · 3 importers

nx_png_textw.nx nx_store_ingest.nx nx_syscalls.nx nx_gen_pipeline.nx nx_gen_orchestrator.nx nx_gen_pipeline_gate.nx nx_gen_realpipe_gate.nx

imports: nx_png_textw.nxnx_store_ingest.nxnx_syscalls.nx

imported by: nx_gen_orchestrator.nxnx_gen_pipeline_gate.nxnx_gen_realpipe_gate.nx

structs

none

consts

none

functions

13func gp_b64_dec_char(c: i64) -> i64
called by 1: gp_b64_decode
24func gp_b64_decode(inp: *u8, n: i64, out: *u8) -> i64
called by 1: gp_one calls 1: gp_b64_dec_char
46func gp_b64_encode(inp: *u8, n: i64, out: *u8) -> i64
called by 1: go_handle_img2img
76func gp_itoa(dst: *u8, off: i64, v: i64) -> i64
called by 1: gp_response calls 1: sys_mmap
90func gp_find_images(resp: *u8, resplen: i64) -> i64
called by 1: gp_response
105func gp_next_str(resp: *u8, resplen: i64, pos: *i64, out: *u8, outcap: i64) -> i64
called by 1: gp_response
133func gp_blob_path(blobdir: *u8, cid: *u8, out: *u8) -> i64
called by 3: gp_onemainmain
148func gp_sidecar_append(sidecar: *u8, cid: *u8, path: *u8) -> i64
166func gp_one(b64: *u8, b64len: i64, seed: *u8, model: *u8, sampler: *u8, steps: *u8, host: *u8, prompt: *u8, size: *u8, args: *u8, storeprefix: *u8, blobdir: *u8, sidecar: *u8, cidout: *u8) -> i64
183func gp_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 1: gp_find_from
185func gp_find_from(buf: *u8, n: i64, needle: *u8, from: i64) -> i64
called by 2: gp_next_b64jsongp_response calls 1: gp_slen
193func gp_next_b64json(resp: *u8, resplen: i64, pos: *i64, out: *u8, outcap: i64) -> i64
called by 1: gp_response calls 1: gp_find_from
211func gp_response(resp: *u8, resplen: i64, seed0: i64, model: *u8, sampler: *u8, steps: *u8, host: *u8, prompt: *u8, size: *u8, args: *u8, storeprefix: *u8, blobdir: *u8, sidecar: *u8, cids_out: *u8, maxc: i64) -> i64