Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load image batches #707

Closed
wants to merge 11 commits into from
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