On AMD ROCm (gfx11xx APUs/GPUs), the PiD PidNet forward in fp16/bf16 can
return an all-NaN tensor through the ROCm/AOTriton attention path, which
then corrupts the decoded image. The default (non-AOTriton) path stays
clean, so the bad values come from an AOTriton attention miscompilation on
gfx11xx rather than the PiD math itself (see ROCm/triton#909 and
ROCm/aotriton#179).
Guard the PidNet output on AMD: when it is fp16/bf16 and actually contains
NaN/Inf, log a one-time warning that points at --use-split-cross-attention
and clamp the values with nan_to_num before decode (the same pattern
already used for flux/lumina). Non-AMD devices and fp32 paths are
unaffected; finite outputs only pay a single isfinite() check.
Fixes#14249
Signed-off-by: liminfei-amd <91481003+liminfei-amd@users.noreply.github.com>