Skip to content

Commit d1721d0

Browse files
Support the 5B fun inpaint model. (comfyanonymous#9614)
Use the WanFunInpaintToVideo node without the clip_vision_output.
1 parent a70803e commit d1721d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

comfy_extras/nodes_wan.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def define_schema(cls):
206206

207207
@classmethod
208208
def execute(cls, positive, negative, vae, width, height, length, batch_size, start_image=None, end_image=None, clip_vision_start_image=None, clip_vision_end_image=None) -> io.NodeOutput:
209-
latent = torch.zeros([batch_size, 16, ((length - 1) // 4) + 1, height // 8, width // 8], device=comfy.model_management.intermediate_device())
209+
spacial_scale = vae.spacial_compression_encode()
210+
latent = torch.zeros([batch_size, vae.latent_channels, ((length - 1) // 4) + 1, height // spacial_scale, width // spacial_scale], device=comfy.model_management.intermediate_device())
210211
if start_image is not None:
211212
start_image = comfy.utils.common_upscale(start_image[:length].movedim(-1, 1), width, height, "bilinear", "center").movedim(1, -1)
212213
if end_image is not None:

0 commit comments

Comments
 (0)