mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-03-23 01:50:19 +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 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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user