code wiki / _hdl_build / nx_gen_pipeline.nx
nx_gen_pipeline.nx
buildroot/runtime/_hdl_build/nx_gen_pipeline.nx
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
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
| 13 | func gp_b64_dec_char(c: i64) -> i64 called by 1: gp_b64_decode |
| 24 | func gp_b64_decode(inp: *u8, n: i64, out: *u8) -> i64 |
| 46 | func gp_b64_encode(inp: *u8, n: i64, out: *u8) -> i64 called by 1: go_handle_img2img |
| 76 | func gp_itoa(dst: *u8, off: i64, v: i64) -> i64 |
| 90 | func gp_find_images(resp: *u8, resplen: i64) -> i64 called by 1: gp_response |
| 105 | func gp_next_str(resp: *u8, resplen: i64, pos: *i64, out: *u8, outcap: i64) -> i64 called by 1: gp_response |
| 133 | func gp_blob_path(blobdir: *u8, cid: *u8, out: *u8) -> i64 |
| 148 | func gp_sidecar_append(sidecar: *u8, cid: *u8, path: *u8) -> i64 |
| 166 | func 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 called by 1: gp_response calls 9: sys_mmapgp_b64_decodepng_insert_genrecnx_store_ingest_ingest_cidgp_blob_pathsys_openat_wr+3 |
| 183 | func 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 |
| 185 | func gp_find_from(buf: *u8, n: i64, needle: *u8, from: i64) -> i64 |
| 193 | func gp_next_b64json(resp: *u8, resplen: i64, pos: *i64, out: *u8, outcap: i64) -> i64 |
| 211 | func 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 |