Chaoses-Ib / ComfyScript

A Python frontend and library for ComfyUI
https://discord.gg/arqJbtEg7w
MIT License
429 stars 24 forks source link

Real mode and ImageBatch node #31

Closed roKadikis closed 8 months ago

roKadikis commented 8 months ago

Hi, I'm getting error running ImageBatch in real mode. It's fine in the virtual mode.

from comfy_script.runtime.real import *
load()
from comfy_script.runtime.real.nodes import *

im, mask = LoadImage('test.png')

with Workflow():
    ImageBatch(im, im)
Traceback (most recent call last):
  File "/home/ro/test.py", line 9, in <module>
    ImageBatch(im, im)
  File "/home/ro/ComfyUI/custom_nodes/ComfyScript/src/comfy_script/runtime/real/nodes.py", line 132, in new
    outputs = getattr(obj, obj.FUNCTION)(*args, **kwds)
  File "/home/ro/ComfyUI/nodes.py", line 1658, in batch
    s = torch.cat((image1, image2), dim=0)
TypeError: Multiple dispatch failed for 'torch.cat'; all __torch_function__ handlers returned NotImplemented:

  - tensor subclass <class 'comfy_script.runtime.real.nodes.RealNodeOutputWrapper'>

For more information, try re-running with TORCH_LOGS=not_implemented
Chaoses-Ib commented 8 months ago

Fixed. Please run git pull to update.

roKadikis commented 8 months ago

Great, thanks!