Merge branch 'comfyanonymous:master' into master

This commit is contained in:
patientx 2025-04-28 01:13:53 +03:00 committed by GitHub
commit 6244dfa1e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -981,6 +981,9 @@ def cast_to(weight, dtype=None, device=None, non_blocking=False, copy=False, str
if not copy:
if dtype is None or weight.dtype == dtype:
return weight
if stream is not None:
with stream:
return weight.to(dtype=dtype, copy=copy)
return weight.to(dtype=dtype, copy=copy)
if stream is not None: