Fannovel16 / ComfyUI-Frame-Interpolation

A custom node set for Video Frame Interpolation in ComfyUI.
MIT License
506 stars 48 forks source link

RuntimeError: Input type (struct c10::Half) and bias type (float) should be the same #48

Closed WASasquatch closed 9 months ago

WASasquatch commented 9 months ago

The image output from the interpolation nodes (FILM, Fortuna, etc) seem to be in half format, when they should be full float? If I don't use the interpolation nodes, the images can be saved with combo node, or viewed in preview image. I'm not sure what's going on.

ComfyUI commit: 74b7233f57301bb08c2b29fb420eeacf8757d41c I installed ComfyUI from the repo on a venv, I didn't use the portable.

Upscaling with Image Upscale (with model) node:

ERROR:root:Traceback (most recent call last):
  File "K:\ComfyUI_Main\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "K:\ComfyUI_Main\ComfyUI\execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "K:\ComfyUI_Main\ComfyUI\execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "K:\ComfyUI_Main\ComfyUI\comfy_extras\nodes_upscale_model.py", line 52, in upscale
    s = comfy.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\comfy\utils.py", line 418, in tiled_scale
    ps = function(s_in).to(output_device)
  File "K:\ComfyUI_Main\ComfyUI\comfy_extras\nodes_upscale_model.py", line 52, in <lambda>
    s = comfy.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\comfy_extras\chainner_models\architecture\RRDB.py", line 296, in forward
    return self.model(x)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\container.py", line 217, in forward
    input = module(input)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (struct c10::Half) and bias type (float) should be the same

Preview/Save Image

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "K:\ComfyUI_Main\ComfyUI\execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "K:\ComfyUI_Main\ComfyUI\execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "K:\ComfyUI_Main\ComfyUI\execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "K:\ComfyUI_Main\ComfyUI\comfy_extras\nodes_upscale_model.py", line 52, in upscale
    s = comfy.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\comfy\utils.py", line 418, in tiled_scale
    ps = function(s_in).to(output_device)
  File "K:\ComfyUI_Main\ComfyUI\comfy_extras\nodes_upscale_model.py", line 52, in <lambda>
    s = comfy.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\comfy_extras\chainner_models\architecture\RRDB.py", line 296, in forward
    return self.model(x)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\container.py", line 217, in forward
    input = module(input)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\conv.py", line 460, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "K:\ComfyUI_Main\ComfyUI\lib\site-packages\torch\nn\modules\conv.py", line 456, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Input type (struct c10::Half) and bias type (float) should be the same