6174 / 6174/comflowyspace

Upscaling with models is broken

オープン
#328 コメント 0 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。