mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-07 15:10:50 +08:00
Fix cast issue.
This commit is contained in:
parent
e06033fb97
commit
d3f5ae56b3
@ -22,6 +22,7 @@ from comfy.ldm.seedvr.constants import (
|
||||
SEEDVR2_ROPE_PARTIAL_CHUNK_TOKENS,
|
||||
)
|
||||
import comfy.model_management
|
||||
import comfy.ops
|
||||
|
||||
class Cache:
|
||||
def __init__(self, disable=False, prefix="", cache=None):
|
||||
@ -1041,9 +1042,12 @@ class AdaSingle(nn.Module):
|
||||
)
|
||||
|
||||
if mode == "in":
|
||||
shiftB = comfy.ops.cast_to_input(shiftB, hid)
|
||||
scaleB = comfy.ops.cast_to_input(scaleB, hid)
|
||||
return hid.mul_(scaleA + scaleB).add_(shiftA + shiftB)
|
||||
if mode == "out":
|
||||
if gateB is not None:
|
||||
gateB = comfy.ops.cast_to_input(gateB, hid)
|
||||
return hid.mul_(gateA + gateB)
|
||||
else:
|
||||
return hid.mul_(gateA)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user