code wiki / (root) / nx_gen_inpaint_gate.nx

nx_gen_inpaint_gate.nx

buildroot/runtime/nx_gen_inpaint_gate.nx

5430 B97 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic gen
docsdependenciesstructsconstsfunctions

about

nx_gen_inpaint_gate.nx -- the REFEREE for gen G7 (gw_inpaint_mask): mask inpaint as a NishiLang verb over the engine's A1111 img2img surface. IN-PROCESS over nx_gen_worker.nx (no GPU, no daemon): it composes the img2img body shape the daemon composes and proves FEATURE ON vs OFF yields byte-different bodies, the on-body carries exactly the two fields the served sd-server parses ("mask", "inpainting_mask_invert" -- elder-sdcpp examples/server/main.cpp, sdapi_any2img img2img branch), invert 0 vs 1 differ, the verb is deterministic, and every refusal path is NAMED by code and writes nothing past the caller's offset. DONE-RULE (gen.plan G7): mask rides the A1111 img2img shape the engine already serves; the edited region judged by the coherence organ -- that RENDER half needs a free GPU and is owed; this gate is the COMPOSITION half. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_gen_worker.nx nx_gen_inpaint_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_gen_worker.nx

imported by: nobody (leaf or entry point)

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

main gv_head gv_puts sys_write gv_ctr 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 ↻ ig_len sys_mmap ↻ ig_base gw_cat gv_check gv_puts ↻ ig_find ig_len ↻ gw_inpaint_mask gw_b64_byte_ok gw_cat ↻ gw_catb gw_itoa sys_mmap ↻ ig_same gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n

structs

none

consts

14const IG_CAP: i64 = 4096
15const IG_SENTINEL: i64 = 126
16const IG_MASK_OK: *u8 = "iVBORw0KGgo="
17const IG_MASK_SPACE: *u8 = "iVBO Rw0K"
18const IG_MASK_DATAURI: *u8 = "data:image/png;base64,iVBORw0KGgo="
19const IG_BASE: *u8 = "{\"init_images\":[\"iVBORw0KGgo=\"],\"prompt\":\"x\",\"denoising_strength\":0.6"

functions

21func ig_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: ig_findmain
22func ig_find(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: ig_len
36func ig_same(a: *u8, na: i64, b: *u8, nb: i64) -> i64
called by 1: main
43func ig_base(buf: *u8) -> i64
called by 1: main calls 1: gw_cat
49func main() -> i64