Skip to content

Commit

Permalink
FIXED: ConcatConditioningsWithMultiplier - version compatibility patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ltdrdata committed Oct 16, 2024
1 parent 667dead commit d29c418
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import importlib

version_code = [1, 5]
version_code = [1, 5, 1]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
print(f"### Loading: ComfyUI-Inspire-Pack ({version_str})")

Expand Down
23 changes: 15 additions & 8 deletions inspire/conditioning_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,26 @@
class ConcatConditioningsWithMultiplier:
@classmethod
def INPUT_TYPES(s):
flex_inputs = {}

stack = inspect.stack()
if stack[1].function == 'get_input_data':
if stack[1].function == 'get_input_info':
# bypass validation
for x in range(0, 100):
flex_inputs[f"multiplier{x}"] = ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01})
else:
flex_inputs["multiplier1"] = ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01})
class AllContainer:
def __contains__(self, item):
return True

def __getitem__(self, key):
# Return a default value appropriate for your use case
# Adjust the return value as needed
return "FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}

return {
"required": {"conditioning1": ("CONDITIONING",), },
"optional": AllContainer()
}

return {
"required": {"conditioning1": ("CONDITIONING",), },
"optional": flex_inputs
"optional": {"multiplier1": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0, "step": 0.01}), },
}

RETURN_TYPES = ("CONDITIONING",)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui-inspire-pack"
description = "This extension provides various nodes to support Lora Block Weight and the Impact Pack. Provides many easily applicable regional features and applications for Variation Seed."
version = "1.5"
version = "1.5.1"
license = { file = "LICENSE" }
dependencies = ["matplotlib", "cachetools"]

Expand Down

0 comments on commit d29c418

Please sign in to comment.