mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-23 23:47:25 +08:00
fix phase2 name
This commit is contained in:
parent
f3ad2b7f2e
commit
38d7484166
@ -189,12 +189,9 @@ def cast_modules_with_vbar(comfy_modules, dtype, device, bias_dtype, non_blockin
|
|||||||
return offload_stream
|
return offload_stream
|
||||||
|
|
||||||
|
|
||||||
def phase_2(s, dtype, device, bias_dtype, non_blocking, compute_dtype, want_requant):
|
def resolve_cast_module_with_vbar(s, dtype, device, bias_dtype, compute_dtype, want_requant):
|
||||||
del non_blocking
|
|
||||||
|
|
||||||
prefetch = getattr(s, "_prefetch", None)
|
prefetch = getattr(s, "_prefetch", None)
|
||||||
if prefetch is None:
|
|
||||||
raise RuntimeError("phase_2 called without a VBAR prefetch state")
|
|
||||||
|
|
||||||
if prefetch["resident"]:
|
if prefetch["resident"]:
|
||||||
weight = s._v_weight
|
weight = s._v_weight
|
||||||
@ -302,7 +299,7 @@ def cast_bias_weight(s, input=None, dtype=None, device=None, bias_dtype=None, of
|
|||||||
offload_stream = cast_modules_with_vbar([s], dtype, device, bias_dtype, non_blocking)
|
offload_stream = cast_modules_with_vbar([s], dtype, device, bias_dtype, non_blocking)
|
||||||
comfy.model_management.sync_stream(device, offload_stream)
|
comfy.model_management.sync_stream(device, offload_stream)
|
||||||
|
|
||||||
weight, bias = phase_2(s, dtype, device, bias_dtype, non_blocking, compute_dtype, want_requant)
|
weight, bias = resolve_cast_module_with_vbar(s, dtype, device, bias_dtype, compute_dtype, want_requant)
|
||||||
|
|
||||||
if not prefetched:
|
if not prefetched:
|
||||||
if getattr(s, "_prefetch")["signature"] is not None:
|
if getattr(s, "_prefetch")["signature"] is not None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user