Add batch override

Also fixes image combine, might need to re-add the nodes
This commit is contained in:
City
2023-07-30 00:14:36 +02:00
parent d9292fc161
commit 8215a3c6df
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ class CombineImageBatch:
def combine_images(self,images_a,images_b):
try:
out = torch.cat((images_a,images_b))
out = torch.cat((images_a,images_b), 0)
except RuntimeError:
print(f"Imagine size mismatch! {images_a.size()}, {images_b.size()}")
out = images_a
+7 -2
View File
@@ -80,6 +80,7 @@ class QueueRemote:
"default": "http://127.0.0.1:8188/",
}),
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
"batch_override": ("INT", {"default": 0, "min": 0, "max": 8}),
"system": (["windows", "posix"],),
"enabled": (["true", "false", "remote"],{"default": "true"}),
"node_id": ("INT", {"default": 1, "min": 1, "max": 64}),
@@ -94,14 +95,18 @@ class QueueRemote:
FUNCTION = "queue_on_remote"
CATEGORY = "remote"
def queue_on_remote(self, remote_url, seed, system, enabled, node_id, prompt):
def queue_on_remote(self, remote_url, seed, batch_override, system, enabled, node_id, prompt):
def get_max_batch_size(prompt):
bs = 1
for node in prompt.keys():
if prompt[node]["class_type"] == "EmptyLatentImage":
for k,v in prompt[node]["inputs"].items():
if k == "batch_size":
bs = max(bs,int(v))
if batch_override > 0:
bs = batch_override
prompt[node]["inputs"]["batch_size"] = batch_override
else:
bs = max(bs,int(v))
return bs
if enabled == "false":