Files
Strata/tools/image/sdcpp_vae
Niko1221 97b14b6b06 Image generation, VAE decoder: faster open - the file read in parallel parts, every weight converted straight into one staging buffer over the image program's threads, one device allocation and one copy
The conversions are the per-value ones of src/image/vae/convert.hpp (bf16 -> f32 exact, f32 -> f16 round to nearest
even): the same bytes for any thread count.  sd-cli passes its own thread setting (n_threads), not all cores.  No
cache file, no changed rounding.  wan_vae_open_report says where the open time went; strata-vae-decode --threads N.
test_vae_convert.py: every one of the 65536 bf16 bit patterns (zeros, subnormals, infinities, NaN payloads, values
that round up into the next exponent) gives the same bytes with 1, 2, 7 and 16 threads, agrees with numpy's float16
on every non-NaN pattern and keeps NaN a NaN; the conv layout against numpy.  test_safetensors_lite.py: the parallel
read gives the same bytes as the per-tensor reads (1, 3, 16 parts).  45 passed on boston-20261110-1922-1874.

Pictures of the 16 gate latents byte-identical to cab47f3d2's on both vendors (Spark dgxspark-20261110-1920-2e41,
p620 p620-20261110-1921-b026).  Open, standalone (runtime start-up included):
  Spark 20 cores: 1 thread 1.11-1.22 s (read 253-262, convert 388-393, upload 27-29 ms); 20 threads 0.55-0.56 s
    (read 38-40, convert 37-38, upload 28-29 ms); before (cab47f3d2) 1.03-1.13 s.
  p620 64 threads: 1 thread 1.71-2.24 s (read 348-354, convert 578-579, upload 66-80 ms); 64 threads 1.34-1.35 s
    (read 40, convert 26, upload 68-71 ms; the rest is the HIP runtime's start, which sd-cli has done before).
sd-cli on the Spark (dgxspark-20261110-1926-7d4c), decode_first_stage with the switch, file open included:
0.66-0.69 / 1.23-1.27 / 1.64-1.69 s at 512 / 1024 / 1536x1024 (was 1.62-1.69 s at 1024; sd.cpp 1.03-1.06 /
3.37-3.40 / 4.89-4.95 s); pictures pixel-identical to the standalone decoder 16 of 16.
2026-11-10 19:31:22 +01:00
..