Skip to content

Commit da9dab7

Browse files
Small wan camera memory optimization. (Comfy-Org#9111)
1 parent d2aaef0 commit da9dab7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

comfy/ldm/wan/model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,7 @@ def forward_orig(
769769
# embeddings
770770
x = self.patch_embedding(x.float()).to(x.dtype)
771771
if self.control_adapter is not None and camera_conditions is not None:
772-
x_camera = self.control_adapter(camera_conditions).to(x.dtype)
773-
x = x + x_camera
772+
x = x + self.control_adapter(camera_conditions).to(x.dtype)
774773
grid_sizes = x.shape[2:]
775774
x = x.flatten(2).transpose(1, 2)
776775

0 commit comments

Comments
 (0)