Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions comfy_extras/nodes_rebatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
class LatentRebatch:
@classmethod
def INPUT_TYPES(s):
return {"required": { "latents": ("LATENT",),
return {"required": { "latents": ("LATENT", { "is_list": True }),
"batch_size": ("INT", {"default": 1, "min": 1, "max": 64}),
}}
RETURN_TYPES = ("LATENT",)
INPUT_IS_LIST = True
RETURN_TYPES = ("LATENT", )
OUTPUT_IS_LIST = (True, )

FUNCTION = "rebatch"
Expand Down Expand Up @@ -54,8 +53,6 @@ def cat_batch(batch1, batch2):
return result

def rebatch(self, latents, batch_size):
batch_size = batch_size[0]

output_list = []
current_batch = (None, None, None)
processed = 0
Expand Down Expand Up @@ -105,4 +102,4 @@ def rebatch(self, latents, batch_size):

NODE_DISPLAY_NAME_MAPPINGS = {
"RebatchLatents": "Rebatch Latents",
}
}
Loading