@@ -16,7 +16,8 @@ Metal. It is a denoiser, not a token family: it does not register with the lane
1616The config, the rotary tables and the timestep's modulation (` config.zig ` , ` host.zig ` ) are shared with Metal. The
1717weights are checked as on Metal: the released geometry only, and no tensor left unread.
1818
19- It runs on the two GPUs it was checked on, sm_120 (RTX 5090) and sm_121 (GB10): ` Model.load ` refuses any other.
19+ It runs on the three GPUs it was checked on, sm_89 (RTX 4090), sm_120 (RTX 5090) and sm_121 (GB10): ` Model.load `
20+ refuses any other.
2021
2122## Precision
2223
@@ -69,7 +70,7 @@ SUMMARY moss image: 8 kernels, 8 pass gates 1-4, 0 fail; 5 controls: 5 red as pl
6970``` sh
7071hf download OpenMOSS-Team/MOSS-Image-Base --revision 85975793d8b3d432f1b6e27f352abaa4c2a4c0d3 --local-dir MODEL_DIR
7172python3 tools/zig/moss_image_case.py case MODEL_DIR case/ --prompt-file prompt.txt --device cuda
72- zig build install -Doptimize=ReleaseFast -Dnvcc=/usr/local/cuda/bin/nvcc -Dsm=121 # -Dsm= 120 for an RTX 5090
73+ zig build install -Doptimize=ReleaseFast -Dnvcc=/usr/local/cuda/bin/nvcc -Dsm=121 # 120: RTX 5090, 89: RTX 4090
7374zig-out/bin/tf-moss-image MODEL_DIR/transformer case/case.safetensors case/
7475python3 tools/zig/moss_image_case.py decode MODEL_DIR case/latents.f32 case/zig.png --device cuda
7576python3 tools/zig/moss_image_case.py compare case/reference.png case/zig.png case/side.png
@@ -121,3 +122,23 @@ velocities and float32 runs as recorded on the GB10):
121122- **Memory:** the transformer' s bf16 weights (9.5 GB) on the device, plus scratch sized at load for one image and the
122123 longest prompt: 0.51 GB at 1024x1024 with a 34-row prompt (from the allocations, not measured), and cuBLASLt' s
123124 32 MiB workspace.
125+
126+ Results on an RTX 4090 (sm_89, 24 GB, Windows 11, driver 616.56, nvcc 13.3), with the cases made on the same card
127+ (torch 2.12.0, diffusers 0.42.1, transformers 5.22.1) from the recipe' s fox and sticky-note prompts and seeds:
128+
129+ - ** Contract:** ` tf-cuda-test moss-contract` gives the same summary line as above (8 kernels pass gates 1-4, 5 controls
130+ red as planted).
131+ - ** Velocity:** against torch bf16, cosine 0.99972 to 0.99998 (fox) and 0.99978 to 0.99998 (sticky note). Against the
132+ float32 run, mean 1 - cosine: fox prompt 1.600e-4 (torch bf16' s own 1.609e-4), negative 1.702e-4 (1.696e-4); sticky
133+ note prompt 1.652e-4 (1.638e-4), negative 1.791e-4 (1.791e-4). Ours is the closer at 25 and 20 of the fox' s steps,
134+ 22 and 23 of the sticky note' s.
135+ - **Image:** 46.54 dB PSNR from the pipeline' s picture for the fox, 29.85 dB for the sticky note (its handwritten text
136+ the same). Against a float32 run of the whole schedule, over the 8 cases (both prompts, seeds 42/7, 1, 2, 3), ours is
137+ the closer in 5, at a mean of 31.62 dB against torch bf16' s 31.35 dB.
138+ - **Repeat:** identical bytes, the same step twice and two runs of the fox case.
139+ - **Speed**, the GPU otherwise idle:
140+ - torch bf16: 0.490 s a forward for the fox, 0.499 s for the sticky note (the median of its 100).
141+ - Ours: 0.352 s and 0.358 s, 1.39x torch' s (35.2 s and 35.8 s for 50 guided steps). Load 4.6 to 5.0 s.
142+ - ** Memory:** as on the 5090. The case tool' s own pipeline holds the 16 GB encoder and the transformer at once, which
143+ does not fit in 24 GB: the cases above were made with the encoder and transformer taking turns on the card (the
144+ float32 transformer converted on the host), the publisher' s code otherwise unchanged.
0 commit comments