mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2025-12-13 16:04:34 +08:00
Small wan camera memory optimization. (#9111)
This commit is contained in:
parent
d2aaef029c
commit
da9dab7edd
@ -769,8 +769,7 @@ class CameraWanModel(WanModel):
|
|||||||
# embeddings
|
# embeddings
|
||||||
x = self.patch_embedding(x.float()).to(x.dtype)
|
x = self.patch_embedding(x.float()).to(x.dtype)
|
||||||
if self.control_adapter is not None and camera_conditions is not None:
|
if self.control_adapter is not None and camera_conditions is not None:
|
||||||
x_camera = self.control_adapter(camera_conditions).to(x.dtype)
|
x = x + self.control_adapter(camera_conditions).to(x.dtype)
|
||||||
x = x + x_camera
|
|
||||||
grid_sizes = x.shape[2:]
|
grid_sizes = x.shape[2:]
|
||||||
x = x.flatten(2).transpose(1, 2)
|
x = x.flatten(2).transpose(1, 2)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user