Note: Throughput measured with single-image generation (num_images_per_prompt=1).
Accuracy Results
Test 1: Determinism (bfloat16, same seed)
Metric
Value
MSE
0.000000
MAE
0.000000
PSNR
inf dB
Relative Error
0.0000%
Status
PASS
Interpretation: Two consecutive NPU bfloat16 runs with identical seed produce pixel-perfect identical outputs. NPU inference is fully deterministic and reproducible.
Test 2: Cross-Precision (float16 vs bfloat16)
Metric
Value
MSE
14550.84
MAE
102.35
PSNR
6.50 dB
Relative Error
40.14%
Status
FAIL
Interpretation: float16 inference produces invalid/corrupted output (invalid value encountered in cast warning during image post-processing). This indicates float16 numerical instability in this model architecture (likely due to the Qwen2.5-VL language model component). bfloat16 is the recommended dtype for NPU deployment.
Baseline Note
CPU float32 baseline was omitted due to excessive memory requirements (>64 GB RAM estimated) and impractical runtime. NPU self-consistency (determinism) and cross-precision checks serve as the practical accuracy validation methodology for this hardware configuration.
Key Findings
NPU bfloat16 inference is fully functional and deterministic. The model runs successfully on Ascend910_9362 with consistent, reproducible outputs.
float16 is not recommended. The model exhibits numerical instability under float16, producing corrupted images. Use bfloat16 for all production deployments.
Latency is stable. P90 latency is within 0.05% of average, indicating consistent performance without significant tail latency.
8-step Turbo mode works as advertised. The distilled pipeline completes inference in ~6.2s per image on a single NPU.
Recommendations
Always use torch.bfloat16 for this model on Ascend NPU.
Set generator=torch.Generator(device="npu").manual_seed(seed) for reproducible results.
For text rendering tasks, enclose target text in quotation marks as per the official model documentation.
Consider model CPU offloading (pipe.enable_model_cpu_offload()) if running on devices with limited NPU memory.