凤
weixin_44093752/FloodDiffusionTiny-Ascend-NPU
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

FloodDiffusionTiny Ascend NPU adaptation

This repository adapts the official ShandaAI/FloodDiffusionTiny model. Google/Kimi and the official Hugging Face page were checked on 2026-08-22. The original page currently redirects to AlayaLab/FloodDiffusionTiny; the page preserves the official GitHub link and documents the Tiny model as Apache-2.0 with 9.18M model parameters.

Real Ascend910 smoke result

The official model and VAE safetensors were loaded strictly in the QuietPhoenix Ascend container. The adapted runtime completed a real npu:0 forward with torch_npu, output [1,263], torch.float32, all values finite, and NPU forward latency 0.3903s. The input uses feature length 1 and five denoising steps because this is an authorized NPU smoke run rather than a full quality gate.

ItemResult
Devicenpu:0
Latent output[1,4]
Decoded output[1,263]
Dtypetorch.float32
Finitetrue
Parameters26,685,647 including VAE
NPU forward0.390262s

Ascend compatibility changes

  • RoPE frequency construction uses complex64 instead of unsupported complex128 on Ascend.
  • The official FlashAttention path is selected only for CUDA; the NPU path uses a float32 attention fallback.
  • The smoke entrypoint uses deterministic fixed text features to avoid downloading the separate GB-scale UMT5 text encoder while preserving the official diffusion and VAE weights.

Weights are intentionally excluded from Git by .gitignore; model-lock.json records the official revision, file sizes, and SHA-256 values. Place model.safetensors and vae.safetensors beside ldf.yaml before running.

Run

source /usr/local/Ascend/ascend-toolkit/set_env.sh
python inference.py --model-dir . --device npu --output validation/npu-runtime.json

This result is a smoke-only NPU execution record. It does not claim the full task precision or generation-quality gate.

Evidence

Agent workflow

NPU device call

Model result