mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-07 18:27:40 +08:00
Add 128 divisibility for nabla
This commit is contained in:
parent
0c84b7650f
commit
a3f78be5c2
@ -387,7 +387,7 @@ class Kandinsky5(nn.Module):
|
|||||||
transformer_options["block_type"] = "double"
|
transformer_options["block_type"] = "double"
|
||||||
|
|
||||||
B, _, T, H, W = x.shape
|
B, _, T, H, W = x.shape
|
||||||
NABLA_THR = 40 # long (10 sec) generation
|
NABLA_THR = 31 # long (10 sec) generation
|
||||||
if T > NABLA_THR:
|
if T > NABLA_THR:
|
||||||
assert self.patch_size[0] == 1
|
assert self.patch_size[0] == 1
|
||||||
|
|
||||||
@ -481,5 +481,3 @@ class Kandinsky5(nn.Module):
|
|||||||
self,
|
self,
|
||||||
comfy.patcher_extension.get_all_wrappers(comfy.patcher_extension.WrappersMP.DIFFUSION_MODEL, transformer_options)
|
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)
|
).execute(x, timestep, context, y, time_dim_replace=time_dim_replace, transformer_options=transformer_options, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,9 @@ class Kandinsky5ImageToVideo(io.ComfyNode):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def execute(cls, positive, negative, vae, width, height, length, batch_size, start_image=None) -> io.NodeOutput:
|
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())
|
latent = torch.zeros([batch_size, 16, ((length - 1) // 4) + 1, height // 8, width // 8], device=comfy.model_management.intermediate_device())
|
||||||
cond_latent_out = {}
|
cond_latent_out = {}
|
||||||
if start_image is not None:
|
if start_image is not None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user