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:
+9
-5
@@ -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
@@ -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 = []
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class RgthreePowerPuter extends RgthreeBaseServerNode {
|
||||
this.scheduleStabilize();
|
||||
},
|
||||
{
|
||||
values: ["INT", "FLOAT", "STRING", "BOOL"],
|
||||
values: ["INT", "FLOAT", "STRING", "BOOL", "*"],
|
||||
},
|
||||
);
|
||||
this.expressionWidget = ComfyWidgets["STRING"](
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user