mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-29 15:50:22 +08:00
Merge branch 'comfyanonymous:master' into master
This commit is contained in:
commit
6244dfa1e1
@ -981,6 +981,9 @@ def cast_to(weight, dtype=None, device=None, non_blocking=False, copy=False, str
|
|||||||
if not copy:
|
if not copy:
|
||||||
if dtype is None or weight.dtype == dtype:
|
if dtype is None or weight.dtype == dtype:
|
||||||
return weight
|
return weight
|
||||||
|
if stream is not None:
|
||||||
|
with stream:
|
||||||
|
return weight.to(dtype=dtype, copy=copy)
|
||||||
return weight.to(dtype=dtype, copy=copy)
|
return weight.to(dtype=dtype, copy=copy)
|
||||||
|
|
||||||
if stream is not None:
|
if stream is not None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user