code wiki / (root) / nx_f32_upsample.nx

nx_f32_upsample.nx

buildroot/runtime/nx_f32_upsample.nx

3057 B75 linesdepth 4pulls 5 transitivereach 1 importersview sourcekind tooltopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_upsample.nx -- software-f32 nearest-neighbour Nx upsample (NCHW), VAE-decode brick. sd-server -> Nishi migration: VAE decoders upscale via "resize-conv" = nearest-neighbour upsample followed by nx_f32_conv2d (avoids the checkerboard artefacts of transposed conv). out[n,c,oy,ox] = in[n,c,oy/scale,ox/scale] -- pure index replication of f32 bit-patterns, so it's exact (no arithmetic). The i64 ref `nx_upsample.nx` is the Q10 version; this is the f32-tier one that pairs with the gated f32 conv/resblock so real dequantized weights flow through the decode path. license_tier: ORIGINAL

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_f32_cvt.nx nx_f32_upsample.nx nx_f32_vae_decode_tiny.nx

imports: nx_syscalls.nxnx_f32_cvt.nx

imported by: nx_f32_vae_decode_tiny.nx

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

main sys_mmap nx_i32_to_f32 nx_f32_upsample_nn

structs

none

consts

12const NX_F32US_OK: i64 = 0
13const NX_F32US_ERR: i64 = 1

functions

16func nx_f32_upsample_nn(input: *i64, N: i64, C: i64, H: i64, W: i64, scale: i64, out: *i64) -> i64
50func main() -> i64