The vendored group-offloading helper (see the "Modified from .../diffusers/v0.36.0"
header) resolved its data-transfer stream by probing for CUDA/XPU only, so
`gpu_memory_mode="model_group_offload"`, which calls `apply_group_offloading(..., use_stream=True)`,
raised on a host whose accelerator is neither of those:
ValueError: Using streams for data transfer requires a CUDA device, or an Intel XPU device.
even when the accelerator's backend implements streams (for example Ascend NPU, where
`torch.cuda.is_available()` is False while `torch.npu` is available and provides `Stream`).
Resolve the stream from the onload device's own backend instead, and keep rejecting devices
whose backend cannot stream, with a message that names the device type. This is the same
policy upstream diffusers applies in the function this file is derived from.
Signed-off-by: li-lizhe <147392333@qq.com>