Z-Image inference gets stuck on Loading transformer

#37 · open · 1 comments

View on GitHub ↗

timothybroome

``` iris.c % ./iris -d zimage-turbo -p "a fish" -o fish.png MPS: Metal GPU | Apple M4 | 10 cores Seed: 1771362514 Loading VAE... done (0.0s) Model: Z-Image-Turbo-6B v1.0 (zimage, 9 steps, guidance 0.0) Loading Qwen3 encoder... done (1.3s) Encoding text... done (16.5s) Loading Z-Image transformer... ``` Hardware 2025 M4 Macbook Air Model downloaded as-per readme documentation: `pip install huggingface_hub && python download_model.py zimage-turbo`

Comments

martin-frbg

On my M4 mini (16GB) the mps-enabled iris eventually gets killed in this stage, probably due to running out of memory (exit code is 137). Both "blas" (Accelerate) and "generic" builds work on this hardware but produce weird mosaics, same as on x86_64. ``` Loading Z-Image transformer...Process 11519 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGKILL frame #0: 0x000000010004f164 iris`get_cached_bf16_as_f16_buffer(weights=0x00000078f7c00000, num_elements=39321600) at iris_metal.m:1047:35 1044 return nil; 1045 } 1046 for (size_t i = 0; i < num_elements; i++) { -> 1047 f16_data[i] = bf16_to_f16(weights[i]); 1048 } 1049 1050 size_t size = num_elements * sizeof(uint16_t); Target 0: (iris) stopped. (lldb) ```