Power Puter: Allow passing anything through. Mostuseful to pass the value of an input when it's not a primitive (like model, conditioning, etc.)

This commit is contained in:
rgthree
2025-05-24 16:17:45 -04:00
parent 0cf25c9205
commit e349f57edc
4 changed files with 12 additions and 8 deletions
+9 -5
View File
@@ -182,11 +182,15 @@ class RgthreePowerPuter:
value = float(value)
elif output == 'BOOL':
value = bool(value)
elif isinstance(value, (dict, list)):
value = json.dumps(value, indent=2)
else:
value = str(value)
elif output == 'STRING':
if isinstance(value, (dict, list)):
value = json.dumps(value, indent=2)
else:
value = str(value)
elif output == '*':
# Do nothing, the output will be passed as-is. This could be anything and it's up to the
# user to control the intended output, like passing through an input value, etc.
pass
return (value,)
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "rgthree-comfy"
description = "Making ComfyUI more comfortable."
version = "1.0.2505241559"
version = "1.0.2505241617"
license = { file = "LICENSE" }
dependencies = []
+1 -1
View File
@@ -55,7 +55,7 @@ class RgthreePowerPuter extends RgthreeBaseServerNode {
this.scheduleStabilize();
},
{
values: ["INT", "FLOAT", "STRING", "BOOL"],
values: ["INT", "FLOAT", "STRING", "BOOL", "*"],
},
);
this.expressionWidget = ComfyWidgets["STRING"](
+1 -1
View File
@@ -33,7 +33,7 @@ class RgthreePowerPuter extends RgthreeBaseServerNode {
this.outputTypeWidget = this.addWidget("combo", "output", "STRING", (...args) => {
this.scheduleStabilize();
}, {
values: ["INT", "FLOAT", "STRING", "BOOL"],
values: ["INT", "FLOAT", "STRING", "BOOL", "*"],
});
this.expressionWidget = ComfyWidgets["STRING"](this, "code", ["STRING", { multiline: true }], app).widget;
}