You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
I'm trying to modify the Bus node to pass through additional stuff (I'd like to pass 2 images [one for original, one for processed], seed number, latent size, etc towards the goal of having a bus on either end of my workflow modules (right now, I am inelegantly using reroutes for this).
However, when I try to do this just with one image as below (procimage is what I'm using here, but I've tried several names) I get this error:
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "D:\AegisFlow\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AegisFlow\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AegisFlow\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AegisFlow\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 12218, in bus_fn
out_procimage = procimage or bus_procimage
^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Boolean value of Tensor with more than one value is ambiguous
**Here's my attempt to modify the WAS_node_suite.py: I'm trying first to get the syntax right by copying other inputs pattern. I've added one more "none" to the (self, bus=(none,none....) area to accomodate the new line. Also, if I disconnect the preview node at the end, it will run without an error:
**
# Bus. Converts the 5 main connectors into one, and back again. You can provide a bus as input
# or the 5 separate inputs, or a combination. If you provide a bus input and a separate
# input (e.g. a model), the model will take precedence.
#
# The term 'bus' comes from computer hardware, see https://en.wikipedia.org/wiki/Bus_(computing)
class WAS_Bus:
def __init__(self):
pass
@classmethod
def INPUT_TYPES(cls):
return {
"required":{},
"optional": {
"bus" : ("BUS",),
"model": ("MODEL",),
"clip": ("CLIP",),
"vae": ("VAE",),
"procimage": ("IMAGE",),
"positive": ("CONDITIONING",),
"negative": ("CONDITIONING",),
}
}
RETURN_TYPES = ("BUS", "MODEL", "CLIP", "VAE", "IMAGE", "CONDITIONING", "CONDITIONING",)
RETURN_NAMES = ("bus", "model", "clip", "vae", "procimage", "positive", "negative")
FUNCTION = "bus_fn"
CATEGORY = "WAS Suite/Utilities"
def bus_fn(self, bus=(None,None,None,None,None,None), model=None, clip=None, vae=None, procimage=None, positive=None, negative=None):
# Unpack the 5 constituents of the bus from the bus tuple.
(bus_model, bus_clip, bus_vae, bus_procimage, bus_positive, bus_negative) = bus
# If you pass in specific inputs, they override what comes from the bus.
out_model = model or bus_model
out_clip = clip or bus_clip
out_vae = vae or bus_vae
out_procimage = procimage or bus_procimage
out_positive = positive or bus_positive
out_negative = negative or bus_negative
# Squash all 5 inputs into the output bus tuple.
out_bus = (out_model, out_clip, out_vae, out_procimage, out_positive, out_negative)
if not out_model:
raise ValueError('Either model or bus containing a model should be supplied')
if not out_clip:
raise ValueError('Either clip or bus containing a clip should be supplied')
if not out_vae:
raise ValueError('Either vae or bus containing a vae should be supplied')
# We don't insist that a bus contains conditioning.
return (out_bus, out_model, out_clip, out_vae, out_procimage, out_positive, out_negative)
I realize that this is probably some dumb, simple mistake, but I've been troubleshooting it for an hour with different arrangements and variable names, to no avail.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to modify the Bus node to pass through additional stuff (I'd like to pass 2 images [one for original, one for processed], seed number, latent size, etc towards the goal of having a bus on either end of my workflow modules (right now, I am inelegantly using reroutes for this).
However, when I try to do this just with one image as below (procimage is what I'm using here, but I've tried several names) I get this error:
**Here's my attempt to modify the WAS_node_suite.py: I'm trying first to get the syntax right by copying other inputs pattern. I've added one more "none" to the (self, bus=(none,none....) area to accomodate the new line. Also, if I disconnect the preview node at the end, it will run without an error:
**
I realize that this is probably some dumb, simple mistake, but I've been troubleshooting it for an hour with different arrangements and variable names, to no avail.
Beta Was this translation helpful? Give feedback.
All reactions