Add default device argument. (#9023)

This commit is contained in:
comfyanonymous
2025-07-23 11:20:49 -07:00
committed by GitHub
parent 255f139863
commit 5ad33787de
3 changed files with 12 additions and 1 deletions

View File

@@ -880,6 +880,7 @@ def vae_dtype(device=None, allowed_dtypes=[]):
return d
# NOTE: bfloat16 seems to work on AMD for the VAE but is extremely slow in some cases compared to fp32
# slowness still a problem on pytorch nightly 2.9.0.dev20250720+rocm6.4 tested on RDNA3
if d == torch.bfloat16 and (not is_amd()) and should_use_bf16(device):
return d