6174 / 6174/comflowyspace

Upscaling with models is broken

Đang mở
#328 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
136
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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(
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, pytorch
Lĩnh vực
ai, computer-graphics
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.