code wiki / (root) / nx_galx_lora_export.nx

nx_galx_lora_export.nx

buildroot/runtime/nx_galx_lora_export.nx

8297 B165 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic galx
docsdependenciesstructsconstsfunctions

about

nx_galx_lora_export.nx -- SOVEREIGN LoRA dataset export. Reads the favorite flag set (galx_fav.log, latest-vote-per-cid, keep v==1), resolves each favorited image to its source path (sidecar) and its prompt caption (PNG tEXt/iTXt "prompt" key), and writes a training manifest: knowledge/lora/favorites/manifest.tsv -> <image_path>\t<caption> (one line per favorite) This is the ready-to-train dataset a LoRA / i2i pipeline consumes (the next rung). NishiLang only. Usage: nx_galx_lora_export (no args). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_galx_lora_export.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main le_mkdir sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_openat_wr le_p sys_write sys_exit le_cideq le_sidecar sys_mmap ↻ sys_read_file ↻ sys_openat_rd ↻ sys_read ↻ sys_close ↻ le_prompt le_be32 le_is_prompt sys_write ↻ le_n sys_mmap ↻ sys_write ↻

structs

none

consts

8const FAV_MAGIC_200000: i64 = 200000
9const FAV_MAGIC_2048: i64 = 2048
10const FAV_MAGIC_16384: i64 = 16384
11const FAV_MAGIC_262144: i64 = 262144
13const FAV_LOG: *u8 = "knowledge/status/galx_fav.log" as *u8
14const SIDECAR: *u8 = "knowledge/status/galx_cid_paths.tsv" as *u8
15const OUT: *u8 = "knowledge/lora/favorites/manifest.tsv" as *u8

functions

17func le_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
18func le_n(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1}; sys_write(1,b,k); return 0 }
called by 1: main calls 2: sys_mmapsys_write
19func le_mkdir(path: *u8) -> i64 { return __syscall(258, 0-100, path as i64, 0x1ff, 0, 0, 0) }
called by 1: main
20func le_be32(b: *u8, o: i64) -> i64 { return ((b[o] as i64)<<24)|((b[o+1] as i64)<<16)|((b[o+2] as i64)<<8)|(b[o+3] as i64) }
called by 1: le_prompt
21func le_cideq(a: *u8, ao: i64, b: *u8, bo: i64) -> i64 { var k: i64=0; while k<69 { if a[ao+k]!=b[bo+k] { return 0 } k=k+1 } return 1 }
called by 1: main
24func le_is_prompt(buf: *u8, ko: i64, ke: i64) -> i64
called by 1: le_prompt
32func le_prompt(png: *u8, n: i64, out: *u8, cap: i64) -> i64
called by 1: main calls 2: le_be32le_is_prompt
81func le_sidecar(cid: *u8, out: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
100func main() -> i64