Add 128 divisibility for nabla

This commit is contained in:
Mihail Karaev 2025-12-17 07:37:46 +00:00
parent 0c84b7650f
commit a3f78be5c2
2 changed files with 4 additions and 3 deletions

View File

@ -387,7 +387,7 @@ class Kandinsky5(nn.Module):
transformer_options["block_type"] = "double"
B, _, T, H, W = x.shape
NABLA_THR = 40 # long (10 sec) generation
NABLA_THR = 31 # long (10 sec) generation
if T > NABLA_THR:
assert self.patch_size[0] == 1
@ -481,5 +481,3 @@ class Kandinsky5(nn.Module):
self,
comfy.patcher_extension.get_all_wrappers(comfy.patcher_extension.WrappersMP.DIFFUSION_MODEL, transformer_options)
).execute(x, timestep, context, y, time_dim_replace=time_dim_replace, transformer_options=transformer_options, **kwargs)

View File

@ -34,6 +34,9 @@ class Kandinsky5ImageToVideo(io.ComfyNode):
@classmethod
def execute(cls, positive, negative, vae, width, height, length, batch_size, start_image=None) -> io.NodeOutput:
if length > 121: # 10 sec generation, for nabla
height = 128 * round(height / 128)
width = 128 * round(width / 128)
latent = torch.zeros([batch_size, 16, ((length - 1) // 4) + 1, height // 8, width // 8], device=comfy.model_management.intermediate_device())
cond_latent_out = {}
if start_image is not None: