Increase reference images limit to 14 and prompt limit to 10000 for image inference

This commit is contained in:
Sirshendu Ganguly
2026-01-14 20:30:18 -05:00
parent d7754e06cc
commit 5beb48676b
5 changed files with 65 additions and 85 deletions
+26 -24
View File
@@ -4,25 +4,26 @@ from .utils import runwareUtils as rwUtils
class referenceImages:
"""Reference Images node for providing reference images for identity consistency"""
MAX_IMAGES = 14
@classmethod
def INPUT_TYPES(cls):
requiredInputs = {
"Image 1": ("IMAGE", {
"tooltip": "Specifies Reference Image 1 that will be used as reference for the subject. These reference images help the AI to maintain identity consistency during the generation process."
}),
}
optionalInputs = {}
for i in range(2, cls.MAX_IMAGES + 1):
ordinal = rwUtils.getOrdinal(i)
optionalInputs[f"Image {i}"] = ("IMAGE", {
"tooltip": f"Specifies {ordinal.capitalize()} Reference Image that will be used as reference for the subject. These reference images help the AI to maintain identity consistency during the generation process."
})
return {
"required": {
"Image 1": ("IMAGE", {
"tooltip": "Specifies Reference Image 1 that will be used as reference for the subject. These reference images help the AI to maintain identity consistency during the generation process."
}),
},
"optional": {
"Image 2": ("IMAGE", {
"tooltip": "Specifies Reference Image 2 that will be used as reference for the subject. These reference images help the AI to maintain identity consistency during the generation process."
}),
"Image 3": ("IMAGE", {
"tooltip": "Specifies Reference Image 3 that will be used as reference for the subject. These reference images help the AI to maintain identity consistency during the generation process."
}),
"Image 4": ("IMAGE", {
"tooltip": "Specifies Reference Image 4 that will be used as reference for the subject. These reference images help the AI to maintain identity consistency during the generation process."
}),
}
"required": requiredInputs,
"optional": optionalInputs
}
DESCRIPTION = "Used With Runware Tasks To Provide Reference Images For The Subject. These Reference Images Help The AI To Maintain Identity Consistency During The Generation Process."
@@ -33,15 +34,16 @@ class referenceImages:
def referenceImages(self, **kwargs):
"""Collect and convert reference images to list"""
image1 = kwargs.get("Image 1")
image2 = kwargs.get("Image 2", None)
image3 = kwargs.get("Image 3", None)
image4 = kwargs.get("Image 4", None)
imageList = [rwUtils.convertTensor2IMG(image1)]
imageList = []
optionalImages = [image2, image3, image4]
for image in optionalImages:
# Always include Image 1 (required)
image1 = kwargs.get("Image 1")
if image1 is not None:
imageList.append(rwUtils.convertTensor2IMG(image1))
# Add optional images 2 through MAX_IMAGES
for i in range(2, self.MAX_IMAGES + 1):
image = kwargs.get(f"Image {i}", None)
if image is not None:
imageList.append(rwUtils.convertTensor2IMG(image))