sageattention 2.2.0 result invalid value encountered in cast
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
wan2.1 480p basic workflow when use sage attention result in black image,use weight_dtype is default.
use --disable-xformers --force-upcast-attention doesn't help,still output black image.
##################
CUDA_VISIBLE_DEVICES=0 python main.py --listen --port 7870 --disable-metadata --use-sage-attention --disable-all-custom-nodes
#################
### Actual Behavior
### Steps to Reproduce
[image_to_video_wan_example.json](https://github.com/user-attachments/files/21465457/image_to_video_wan_example.json)
use this workflow,and CUDA_VISIBLE_DEVICES=0 python main.py --listen --port 7870 --disable-metadata --use-sage-attention --disable-all-custom-nodes
### Debug Logs
```powershell
got prompt
Using xformers attention in VAE
Using xformers attention in VAE
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Requested to load CLIPVisionModelProjection
loaded completely 20941.7375 1208.09814453125 True
Using scaled fp8: fp8 matrix mult: False, scale input: False
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load WanTEModel
loaded completely 19631.5119140625 6419.477203369141 True
Requested to load WanVAE
loaded completely 11031.234706878662 242.02829551696777 True
model weight dtype torch.float8_e4m3fn, manual cast: torch.float16
model_type FLOW
Requested to load WAN21
loaded completely 19763.37561607666 15636.317199707031 True
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [01:32<00:00, 4.63s/it]
Requested to load WanVAE
loaded completely 2471.309841156006 242.02829551696777 True
/data/wangxi/ComfyUI/comfy_extras/nodes_images.py:134: RuntimeWarning: invalid value encountered in cast
img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
Prompt executed in 103.21 seconds
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.