6174 / 6174/comflowyspace

Upscaling with models is broken

未关闭
#328 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
2.3k
派生
136
PR 合并指标
30 天内没有已合并 PR

描述

Comfy: ComfyUI@3dfdddcc91
Comflowy@0.2.3-alpha
pytorch version: 2.5.1
Setup: M4 Pro Macbook

Error:
```
view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

File "/Users/$USER/comflowy/ComfyUI/execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/Users/$USER/comflowy/ComfyUI/execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/Users/$USER/comflowy/ComfyUI/execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "/Users/$USER/comflowy/ComfyUI/execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/Users/$USER/comflowy/ComfyUI/comfy_extras/nodes_upscale_model.py", line 70, 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 "/Users/$USER/comflowy/ComfyUI/comfy/utils.py", line 821, in tiled_scale
return tiled_scale_multidim(samples, function, (tile_y, tile_x), overlap, upscale_amount, out_channels, output_device, pbar)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/Users/$USER/comflowy/ComfyUI/comfy/utils.py", line 795, in tiled_scale_multidim
ps = function(s_in).to(output_device)
File "/Users/$USER/comflowy/ComfyUI/comfy_extras/nodes_upscale_model.py", line 70, in
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 "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 472, in __call__
output = self._call_fn(self.model, image)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 439, in
self._call_fn = call_fn or (lambda model, image: model(image))
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py", line 143, in forward
return self.model(x)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/container.py", line 250, in forward
input = module(input)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 554, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/Users/$USER/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 549, in _conv_forward
return F.conv2d(
```

贡献指南

这个仓库没有索引到贡献指南

调研方向

The error occurs in the upscaling model's forward pass, specifically in a convolution operation. Start by examining the trace in comfy_extras/nodes_upscale_model.py and comfy/utils.py around tiled_scale. The issue likely relates to tensor shape or stride incompatibility when the model processes tiled input. Look at the upscale model's input expectations and the tiling logic to see where the tensor view becomes non-contiguous. Running a minimal test with the upscale node and a known model could reproduce the error.

由索引模型根据 Issue 内容生成。

评估

技术栈
python, pytorch
领域
ai, computer-graphics
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。