Skip to content
Merged
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
1 change: 1 addition & 0 deletions clientlibs/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const DEFAULT_BGCOLOR = "#5345bf";
const DEFAULT_DIMENSIONS_LIST = {
"Square (512x512)": "512x512",
"Square HD (1024x1024)": "1024x1024",
"Square 2K (2048x2048)": "2048x2048",
"Portrait 3:4 (768x1024)": "768x1024",
"Portrait 9:16 (576x1024)": "576x1024",
"Landscape 4:3 (1024x768)": "1024x768",
Expand Down
2 changes: 1 addition & 1 deletion modules/imageInference.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def INPUT_TYPES(cls):
"tooltip": "Prompt weighting allows you to adjust how strongly different parts of your prompt influence the generated image.\n\nChoose between \"compel\" notation with advanced weighting operations or \"sdEmbeds\" for simple emphasis adjustments.\n\nCompel Example: \"small+ dog, pixar style\"\n\nsdEmbeds Example: \"(small:2.5) dog, pixar style\"",
}),
"dimensions": ([
"None", "Square (512x512)", "Square HD (1024x1024)", "Portrait 3:4 (768x1024)",
"None", "Square (512x512)", "Square HD (1024x1024)", "Square 2K (2048x2048)", "Portrait 3:4 (768x1024)",
"Portrait 9:16 (576x1024)", "Landscape 4:3 (1024x768)",
"Landscape 16:9 (1024x576)",
"Custom"
Expand Down
8 changes: 7 additions & 1 deletion modules/imageInferenceInputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ def INPUT_TYPES(cls):
"mask": ("IMAGE", {
"tooltip": "Optional mask image for the inference process."
}),
"seedImage": ("IMAGE", {
"tooltip": "Optional seed image for the inference process"
}),
Comment thread
Sirsho1997 marked this conversation as resolved.
}
Comment thread
Sirsho1997 marked this conversation as resolved.

for i in range(1, cls.MAX_REFERENCE_IMAGES + 1):
Expand Down Expand Up @@ -59,7 +62,7 @@ def INPUT_TYPES(cls):
}

DESCRIPTION = (
"Configure custom inputs for Runware Image Inference, including image/mask, reference images "
"Configure custom inputs for Runware Image Inference, including image/mask/seedImage, reference images "
"(with optional tag, role, type e.g. 'sketch' for illustrative style models, and strength 0-1 for sketch), "
"super resolution references, and font references (inputs.fonts)."
)
Expand All @@ -72,13 +75,16 @@ def createInputs(self, **kwargs):
"""Create image inference inputs from provided parameters"""
image = kwargs.get("image", None)
mask = kwargs.get("mask", None)
seedImage = kwargs.get("seedImage", None)

inputs = {}

if image is not None:
inputs["image"] = rwUtils.convertTensor2IMG(image)
if mask is not None:
inputs["mask"] = rwUtils.convertTensor2IMG(mask)
if seedImage is not None:
inputs["seedImage"] = rwUtils.convertTensor2IMG(seedImage)

references = self._collectReferences(kwargs)
if len(references) > 0:
Expand Down
Loading