nx_galx_lora_export.nx
buildroot/runtime/nx_galx_lora_export.nx
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 [favlog] [sidecar] -- license_tier: ORIGINAL
Default signal = the GALLERY-SIDE SSOT (/volume1/ai/galx/knowledge/status/*) when readable: the fav
log is WRITTEN by the gallery daemon across the GALLERY!=VAULT boundary; absolute reads cross it.
Falls back to the nishihost-relative pair when the gallery volume is unreadable. The summary line
ALWAYS prints favsrc= -- the source actually read announces itself.
dependencies 1 imports · 0 importers
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
structs
| none |
consts
| 12 | const FAV_MAGIC_200000: i64 = 200000 |
| 13 | const FAV_MAGIC_2048: i64 = 2048 |
| 14 | const FAV_MAGIC_16384: i64 = 16384 |
| 15 | const FAV_MAGIC_262144: i64 = 262144 |
| 17 | const FAV_LOG: *u8 = "knowledge/status/galx_fav.log" as *u8 |
| 18 | const SIDECAR: *u8 = "knowledge/status/galx_cid_paths.tsv" as *u8 |
| 19 | const OUT: *u8 = "knowledge/lora/favorites/manifest.tsv" as *u8 |
| 20 | const FAV_LOG_GX: *u8 = "/volume1/ai/galx/knowledge/status/galx_fav.log" as *u8 |
| 21 | const SIDECAR_GX: *u8 = "/volume1/ai/galx/knowledge/status/galx_cid_paths.tsv" as *u8 |
functions
| 23 | func 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 } |
| 24 | func le_n(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; 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 } |
| 25 | func le_mkdir(path: *u8) -> i64 { return __syscall(258, 0-100, path as i64, 0x1ff, 0, 0, 0) } called by 1: main |
| 26 | func 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 |
| 27 | func 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 |
| 30 | func le_is_prompt(buf: *u8, ko: i64, ke: i64) -> i64 called by 1: le_prompt |
| 38 | func le_prompt(png: *u8, n: i64, out: *u8, cap: i64) -> i64 |
| 87 | func le_sidecar(sc: *u8, cid: *u8, out: *u8) -> i64 |
| 106 | func main(argc: i64, argv: *i64) -> i64 |