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 (no args). license_tier: ORIGINAL
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
| 8 | const FAV_MAGIC_200000: i64 = 200000 |
| 9 | const FAV_MAGIC_2048: i64 = 2048 |
| 10 | const FAV_MAGIC_16384: i64 = 16384 |
| 11 | const FAV_MAGIC_262144: i64 = 262144 |
| 13 | const FAV_LOG: *u8 = "knowledge/status/galx_fav.log" as *u8 |
| 14 | const SIDECAR: *u8 = "knowledge/status/galx_cid_paths.tsv" as *u8 |
| 15 | const OUT: *u8 = "knowledge/lora/favorites/manifest.tsv" as *u8 |
functions
| 17 | 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 } |
| 18 | func 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 } |
| 19 | func le_mkdir(path: *u8) -> i64 { return __syscall(258, 0-100, path as i64, 0x1ff, 0, 0, 0) } called by 1: main |
| 20 | 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 |
| 21 | 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 |
| 24 | func le_is_prompt(buf: *u8, ko: i64, ke: i64) -> i64 called by 1: le_prompt |
| 32 | func le_prompt(png: *u8, n: i64, out: *u8, cap: i64) -> i64 |
| 81 | func le_sidecar(cid: *u8, out: *u8) -> i64 |
| 100 | func main() -> i64 |