view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
Your question
Mac Studio M2 Ultra MacOS: 15.0
I recently "updated" Comfy using the installation guide from Comfy.Org to fix the issue of getting noise images. It actually fixed that issue but now I get this error when I attempt to upscale an images. All the time with SD Ultimate and dependent on the size of the images also with upscale using model or other upscale nodes.
Interestingly i have no problems using any upscale method while running Comfy in Pinokio. The only thing I can think of that's different is possibly the versions of Pytorch.
Any suggestion greatly appreciated!
Logs
# ComfyUI Error Report
## Error Details
- **Node Type:** UltimateSDUpscale
- **Exception Type:** RuntimeError
- **Exception Message:** view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
## Stack Trace
File "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/ComfyUI/execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "/Volumes/Extreme_Pro/ComfyUI/execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/nodes.py", line 151, in upscale
processed = script.run(p=self.sdprocessing, _=None, tile_width=self.tile_width, tile_height=self.tile_height,
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 558, in run
upscaler.upscale()
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/usdu_patch.py", line 66, in new_upscale
old_upscale(self)
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 83, in upscale
self.image = self.upscaler.scaler.upscale(self.image, value, self.upscaler.data_path)
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 23, in upscale
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 23, in <listcomp>
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 19, in _upscale
(upscaled,) = image_upscale_node.upscale(shared.actual_upscaler, tensor)
File "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/ComfyUI/comfy/utils.py", line 776, in tiled_scale
return tiled_scale_multidim(samples, function, (tile_y, tile_x), overlap, upscale_amount, out_channels, output_device, pbar)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/Volumes/Extreme_Pro/ComfyUI/comfy/utils.py", line 750, in tiled_scale_multidim
ps = function(s_in).to(output_device)
File "/Volumes/Extreme_Pro/ComfyUI/comfy_extras/nodes_upscale_model.py", line 70, 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 "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 472, in __call__
output = self._call_fn(self.model, image)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 439, in <lambda>
self._call_fn = call_fn or (lambda model, image: model(image))
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py", line 143, in forward
return self.model(x)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/container.py", line 250, in forward
input = module(input)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 554, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 549, in _conv_forward
return F.conv2d(
System Information
- ComfyUI Version: v0.2.2-79-g31f11af
- Arguments: main.py --force-upcast-attention
- OS: posix
- Python Version: 3.10.14 (main, May 6 2024, 14:42:37) [Clang 14.0.6 ]
- Embedded Python: false
- PyTorch Version: 2.6.0.dev20240926
Devices
- Name: mps
- Type: mps
- VRAM Total: 68719476736
- VRAM Free: 33166131200
- Torch VRAM Total: 68719476736
- Torch VRAM Free: 33166131200
Logs
2024-09-26 19:47:15,506 - root - INFO - Total VRAM 65536 MB, total RAM 65536 MB
2024-09-26 19:47:15,506 - root - INFO - pytorch version: 2.6.0.dev20240926
2024-09-26 19:47:15,506 - root - INFO - Set vram state to: SHARED
2024-09-26 19:47:15,506 - root - INFO - Device: mps
2024-09-26 19:47:16,231 - root - INFO - Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
2024-09-26 19:47:16,628 - root - INFO - [Prompt Server] web root: /Volumes/Extreme_Pro/ComfyUI/web
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path checkpoints /Volumes/Extreme_Pro/stable-diffusion-webui/models/Stable-diffusion
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path configs /Volumes/Extreme_Pro/stable-diffusion-webui/models/Stable-diffusion
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path vae /Volumes/Extreme_Pro/stable-diffusion-webui/models/VAE
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path loras /Volumes/Extreme_Pro/stable-diffusion-webui/models/Lora
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path loras /Volumes/Extreme_Pro/stable-diffusion-webui/models/LyCORIS
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path upscale_models /Volumes/Extreme_Pro/stable-diffusion-webui/models/ESRGAN
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path upscale_models /Volumes/Extreme_Pro/stable-diffusion-webui/models/RealESRGAN
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path upscale_models /Volumes/Extreme_Pro/stable-diffusion-webui/models/SwinIR
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path embeddings /Volumes/Extreme_Pro/stable-diffusion-webui/embeddings
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path hypernetworks /Volumes/Extreme_Pro/stable-diffusion-webui/models/hypernetworks
2024-09-26 19:47:16,629 - root - INFO - Adding extra search path controlnet /Volumes/Extreme_Pro/stable-diffusion-webui/models/ControlNet
2024-09-26 19:47:22,845 - root - INFO -
Import times for custom nodes:
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Crystools-save
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/SDXLAspectRatio.py
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/websocket_image_save.py
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/sdxl_prompt_styler
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/cg-use-everywhere
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUi_NNLatentUpscale
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Logic
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/lora-info
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfy-image-saver
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-AutomaticCFG
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-post-processing-nodes
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/WAS_Extras
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_JPS-Nodes
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyMath
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-QualityOfLifeSuit_Omar92
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_essentials
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/Derfuu_ComfyUI_ModdedNodes
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/efficiency-nodes-comfyui
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/rgthree-comfy
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/aegisflow_utility_nodes
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_Comfyroll_CustomNodes
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfyui-prompt-reader-node
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfyui_controlnet_aux
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_tinyterraNodes
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Impact-Pack
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-IF_AI_tools
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Anyline
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack
2024-09-26 19:47:22,845 - root - INFO - 0.0 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Crystools
2024-09-26 19:47:22,845 - root - INFO - 0.1 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfyui-art-venture
2024-09-26 19:47:22,845 - root - INFO - 0.1 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfyui-propost
2024-09-26 19:47:22,845 - root - INFO - 0.1 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfyui_dagthomas
2024-09-26 19:47:22,845 - root - INFO - 0.1 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Manager
2024-09-26 19:47:22,845 - root - INFO - 0.1 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-Easy-Use
2024-09-26 19:47:22,845 - root - INFO - 0.2 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfy_PoP
2024-09-26 19:47:22,846 - root - INFO - 0.3 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfyui_segment_anything
2024-09-26 19:47:22,846 - root - INFO - 0.4 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_Custom_Nodes_AlekPet
2024-09-26 19:47:22,846 - root - INFO - 0.5 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/comfyui-reactor-node
2024-09-26 19:47:22,846 - root - INFO - 0.6 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/was-node-suite-comfyui
2024-09-26 19:47:22,846 - root - INFO - 2.5 seconds: /Volumes/Extreme_Pro/ComfyUI/custom_nodes/DZ-FaceDetailer
2024-09-26 19:47:22,846 - root - INFO -
2024-09-26 19:47:22,853 - root - INFO - Starting server
2024-09-26 19:47:22,853 - root - INFO - To see the GUI go to: http://127.0.0.1:8188
2024-09-26 19:47:29,851 - root - ERROR - [ERROR] An error occurred while retrieving information for the 'IF_ChatPrompt' node.
2024-09-26 19:47:29,851 - root - ERROR - Traceback (most recent call last):
File "/Volumes/Extreme_Pro/ComfyUI/server.py", line 564, in get_object_info
out[x] = node_info(x)
File "/Volumes/Extreme_Pro/ComfyUI/server.py", line 531, in node_info
info['input'] = obj_class.INPUT_TYPES()
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-IF_AI_tools/IFChatPromptNode.py", line 109, in INPUT_TYPES
node = cls()
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-IF_AI_tools/IFChatPromptNode.py", line 53, in __init__
self.agent_tools = self.load_agent_tools()
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI-IF_AI_tools/IFChatPromptNode.py", line 78, in load_agent_tools
for filename in os.listdir(self.agents_dir):
FileNotFoundError: [Errno 2] No such file or directory: '/Volumes/Extreme_Pro/ComfyUI/input/IF_AI/presets/agents'
2024-09-26 19:47:32,667 - root - INFO - got prompt
2024-09-26 19:47:32,914 - root - INFO - model weight dtype torch.float16, manual cast: None
2024-09-26 19:47:32,915 - root - INFO - model_type EPS
2024-09-26 19:47:33,799 - root - INFO - Using split attention in VAE
2024-09-26 19:47:33,800 - root - INFO - Using split attention in VAE
2024-09-26 19:47:33,940 - root - INFO - Requested to load SDXLClipModel
2024-09-26 19:47:33,940 - root - INFO - Loading 1 new model
2024-09-26 19:47:33,946 - root - INFO - loaded completely 0.0 1560.802734375 True
2024-09-26 19:47:34,452 - root - INFO - Using split attention in VAE
2024-09-26 19:47:34,452 - root - INFO - Using split attention in VAE
2024-09-26 19:47:34,861 - root - WARNING - Warning torch.load doesn't support weights_only on this pytorch version, loading unsafely.
2024-09-26 19:47:35,078 - root - INFO - Requested to load SDXLClipModel
2024-09-26 19:47:35,079 - root - INFO - Loading 1 new model
2024-09-26 19:47:36,479 - root - INFO - loaded completely 0.0 1560.802734375 True
2024-09-26 19:47:37,497 - root - INFO - Requested to load SDXL
2024-09-26 19:47:37,497 - root - INFO - Loading 1 new model
2024-09-26 19:47:40,183 - root - INFO - loaded completely 0.0 4897.0483474731445 True
2024-09-26 19:48:25,188 - root - INFO - Requested to load AutoencoderKL
2024-09-26 19:48:25,188 - root - INFO - Loading 1 new model
2024-09-26 19:48:25,338 - root - INFO - loaded completely 0.0 319.11416244506836 True
2024-09-26 19:48:26,695 - root - ERROR - !!! Exception during processing !!! view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
2024-09-26 19:48:26,697 - root - ERROR - Traceback (most recent call last):
File "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/ComfyUI/execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "/Volumes/Extreme_Pro/ComfyUI/execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/nodes.py", line 151, in upscale
processed = script.run(p=self.sdprocessing, _=None, tile_width=self.tile_width, tile_height=self.tile_height,
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 558, in run
upscaler.upscale()
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/usdu_patch.py", line 66, in new_upscale
old_upscale(self)
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 83, in upscale
self.image = self.upscaler.scaler.upscale(self.image, value, self.upscaler.data_path)
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 23, in upscale
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 23, in <listcomp>
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 19, in _upscale
(upscaled,) = image_upscale_node.upscale(shared.actual_upscaler, tensor)
File "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/ComfyUI/comfy/utils.py", line 776, in tiled_scale
return tiled_scale_multidim(samples, function, (tile_y, tile_x), overlap, upscale_amount, out_channels, output_device, pbar)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/Volumes/Extreme_Pro/ComfyUI/comfy/utils.py", line 750, in tiled_scale_multidim
ps = function(s_in).to(output_device)
File "/Volumes/Extreme_Pro/ComfyUI/comfy_extras/nodes_upscale_model.py", line 70, 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 "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 472, in __call__
output = self._call_fn(self.model, image)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 439, in <lambda>
self._call_fn = call_fn or (lambda model, image: model(image))
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py", line 143, in forward
return self.model(x)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/container.py", line 250, in forward
input = module(input)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 554, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 549, in _conv_forward
return F.conv2d(
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
2024-09-26 19:48:26,697 - root - INFO - Prompt executed in 54.02 seconds
2024-09-26 19:48:45,925 - root - INFO - got prompt
2024-09-26 19:49:31,667 - root - ERROR - !!! Exception during processing !!! view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
2024-09-26 19:49:31,667 - root - ERROR - Traceback (most recent call last):
File "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/ComfyUI/execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "/Volumes/Extreme_Pro/ComfyUI/execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/nodes.py", line 151, in upscale
processed = script.run(p=self.sdprocessing, _=None, tile_width=self.tile_width, tile_height=self.tile_height,
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 558, in run
upscaler.upscale()
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/usdu_patch.py", line 66, in new_upscale
old_upscale(self)
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/repositories/ultimate_sd_upscale/scripts/ultimate-upscale.py", line 83, in upscale
self.image = self.upscaler.scaler.upscale(self.image, value, self.upscaler.data_path)
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 23, in upscale
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 23, in <listcomp>
shared.batch = [self._upscale(img, scale) for img in shared.batch]
File "/Volumes/Extreme_Pro/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale/modules/upscaler.py", line 19, in _upscale
(upscaled,) = image_upscale_node.upscale(shared.actual_upscaler, tensor)
File "/Volumes/Extreme_Pro/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 "/Volumes/Extreme_Pro/ComfyUI/comfy/utils.py", line 776, in tiled_scale
return tiled_scale_multidim(samples, function, (tile_y, tile_x), overlap, upscale_amount, out_channels, output_device, pbar)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/Volumes/Extreme_Pro/ComfyUI/comfy/utils.py", line 750, in tiled_scale_multidim
ps = function(s_in).to(output_device)
File "/Volumes/Extreme_Pro/ComfyUI/comfy_extras/nodes_upscale_model.py", line 70, 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 "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 472, in __call__
output = self._call_fn(self.model, image)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/__helpers/model_descriptor.py", line 439, in <lambda>
self._call_fn = call_fn or (lambda model, image: model(image))
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py", line 143, in forward
return self.model(x)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/container.py", line 250, in forward
input = module(input)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 554, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 549, in _conv_forward
return F.conv2d(
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
2024-09-26 19:49:31,668 - root - INFO - Prompt executed in 45.72 seconds
Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.
Workflow too large. Please manually upload the workflow from local file system.
Additional Context
(Please add any additional context or steps to reproduce the error here)
### Other
_No response_
It is not clear whether this issue is related to UltimateSDUpscale or the model upscale.
Try using the Upscale Image (using Model) directly with the same upscale model used in UltimateSDUpscale, instead of using UltimateSDUpscale.
If the issue can be reproduced, leave a simplified workflow and log here.
If it cannot be reproduced, inquire about the issue in the UltimateSDUpscale repository.
It is not clear whether this issue is related to
UltimateSDUpscaleor the model upscale. Try using theUpscale Image (using Model)directly with the same upscale model used inUltimateSDUpscale, instead of usingUltimateSDUpscale. If the issue can be reproduced, leave a simplified workflow and log here. If it cannot be reproduced, inquire about the issue in theUltimateSDUpscalerepository.
Didn't reproduce the error with upscale using model. The work around for now is using the upscale by node at 0.50 and then UltimateSDUpscale at 3x. It appears to be something with the size of the image it's having an issue with. As if the image being passed is too large. I'll ask in the USDUspcale.
Thanks
@ltdrdata I just experienced this same issue trying to do an i2i with Flux on MPS. It failed at the Upscale Image (using Model) node using 4xUltraSharp. The input image was 1024x1024. The strange thing is that this was a modification of a t2i upscaling workflow, and I routinely did 1st stage 1MP generations (since this is Flux) with no issues. But somehow loading the image from a file caused it to fail.
I put a regular Upscale Image node in between and found that an input any higher than 512x512 failed to pass through the upscale with model node. I think this issue should be reopened.
i2i flux upscale.json
I've been getting this same error (in Upscale Latent By and UltimateSDUpscale) for a few weeks now running PyTorch nightlies (up to/including last night's 2.6.0.dev20241002).
I looked back through my output folder and found the last successful UltimateSDUpscale image which was from 2024-09-07. Very non-deterministic data point however my exp. is whenever something breaks on MPS it's almost always torch/torch-adjacent. On a whim I downgraded to stable PyTorch 2.4.1 and everything works like it always did. 🤷♂️
M1 Max 64GB RAM, latest comfy via manager update all, PYTORCH_ENABLE_MPS_FALLBACK=1, --force-fp32 --highvram --fast
I've been getting this same error (in Upscale Latent By and UltimateSDUpscale) for a few weeks now running PyTorch nightlies (up to/including last night's 2.6.0.dev20241002).
I looked back through my output folder and found the last successful UltimateSDUpscale image which was from 2024-09-07. Very non-deterministic data point however my exp. is whenever something breaks on MPS it's almost always torch/torch-adjacent. On a whim I downgraded to stable PyTorch 2.4.1 and everything works like it always did. 🤷♂️
M1 Max 64GB RAM, latest comfy via manager update all, PYTORCH_ENABLE_MPS_FALLBACK=1, --force-fp32 --highvram --fast
Thanks!! On my Mac Studio M2 Ultra tried downgrading to 2.4.1 but still crashed and burned. Downgraded to 2.4.0 and now all is good. As mentioned by @Adreitz, using nightlies and for me 2.4.1, anything above 512x512 will error out.
This issue is related to PyTorch, so I'm closing it.
This seems to be closed, yet I encountered it today on a brand-new installed macos 15.0.1. It was working good until I erased SSD and fresh-installed Sequoia. I installed pytorch most recent one, and it gave me this exact error. I tried python 3.11 and 3.10, both same. Then, I erased conda env, re-made it with python3.11 then I tried pytorch 2.4.1, and boom, it is working beautifully again. Just my 2cents.
M3Max 36GB, 30GPU core.
Not sure if this helps, but I had the exact same error. Also with UltimateSDUpscale.
The error occurs because the tensor is not stored contiguously in memory when the .view() operation is called. To fix this, you need to ensure the tensor is contiguous by adding .contiguous() before the operation.
-
Locate the
RRDB.pyfile in the ESRGAN architecture of thespandrelpackage. It's typically found in:[your Python environment]/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py -
Open the
RRDB.pyfile in a text editor. -
Modify the
forwardmethod of theRRDBNetclass by addingx = x.contiguous()at the beginning of the method. It should look like this:def forward(self, x): x = x.contiguous() <------- if self.shuffle_factor: _, _, h, w = x.size() x = pad_to_multiple(x, self.shuffle_factor, mode="reflect") x = torch.pixel_unshuffle(x, downscale_factor=self.shuffle_factor) x = self.model(x) return x[:, :, : h * self.scale, : w * self.scale] return self.model(x) -
Save the file and restart ComfyUI.
Hope this helps!
Hi @jonasfabian
I don't find this file in Macbook M1. I'm using Conda.
Hi @jonasfabian
I don't find this file in Macbook M1. I'm using Conda.
I'm not entirely sure about your installation, but it might be under:
[YourCondaPath]/envs/[YourEnvName]/lib/python3.x/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py
Replace [YourCondaPath] with the path to your Conda installation (e.g., ~/anaconda3), and [YourEnvName] with the name of your Conda environment. And replace python3.x with your python version.
It worked.
Thanks!
THANKS!!!! Mac Studio M2 Ultra Because I initially installed Comfy with homebrew and later used the Comfy.org's conda method, I had to modify both RRDB.py files in these locations. It didn't work when I only modified the conda file. /opt/homebrew/lib/python3.10/site-package/spandrei/architetures/ESRGAN/aarch/RRDB.py /opt/miniconda3/envs/comfyenv/lib/python3.10/site-packages/spandrei/architectures/ESRGAN/__arch/RRDG.py
Just incase you're not familiar with how to get here, click on desktop, then click Go in Finder menu, select Go to Folder, enter /opt
Thanks @jonasfabian, spent a good .5 hr. looking for where .view was being called from! Please make a PR to https://github.com/chaiNNer-org/spandrel
Nice to hear that it worked for you as well! I’ve created an issue in their repo: https://github.com/chaiNNer-org/spandrel/issues/311
Hi I am also facing this issue with UltimateSDUpscale and ComfyUI.
Could someone explain in simple steps how to fix this? I'm needing it for a project T.T
Good news I fixed the issue by downgrading pytorch
torch==2.3.0 torchvision torchaudio --extra-index https://download.pytorch.org/whl/cpu --force-reinstall
Hmmm... The issue came back again... I am using 2 subsequent UltimateSDUpscale..
@kitmeng
I already described the method to fix this error before. I tried to break it down, make it simpler... so it's easier to understand what I was trying to explain.
Find the File You Need to Edit
You’re looking for a file called RRDB.py in the package used by UltimateSDUpscale and ComfyUI. It should be in a path like this. I used some variables in the path below, as I don't know how your installation path looks like ...
[YourCondaPath]/envs/[YourEnvName]/lib/python3.x/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py
Replace:
[YourCondaPath]with the path where Conda is installed (like~/anaconda3).[YourEnvName]with the name of your Conda environment.python3.xwith your Python version (e.g.,python3.10).
You can find your conda path by running conda info --base
Note: If you don't use Conda, go to the path where python is installed on your system.
Edit the Code
- Open the
RRDB.pyfile with any text editor (e.g., VS Code, Atom, or even a basic editor like TextEdit). - Find the part that looks like this (usually within a class called
RRDBNet):
def forward(self, x):
if self.shuffle_factor:
# Code here
- Add the line
x = x.contiguous()just belowdef forward(self, x):so it looks like this:
def forward(self, x):
x = x.contiguous() # Make tensor ready for the next operation
if self.shuffle_factor:
# Code here
- Then save the file after making the change
- Restart ComfyUI to make sure it picks up the update
Thank you now the instruction is completely foolproof for a beginner like me!
@kitmeng
I already described the method to fix this error before. I tried to break it down, make it simpler... so it's easier to understand what I was trying to explain.
Find the File You Need to Edit
You’re looking for a file called
RRDB.pyin the package used by UltimateSDUpscale and ComfyUI. It should be in a path like this. I used some variables in the path below, as I don't know how your installation path looks like ...
[YourCondaPath]/envs/[YourEnvName]/lib/python3.x/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.pyReplace:
[YourCondaPath]with the path where Conda is installed (like~/anaconda3).[YourEnvName]with the name of your Conda environment.python3.xwith your Python version (e.g.,python3.10).You can find your conda path by running
conda info --baseNote: If you don't use Conda, go to the path where python is installed on your system.
Edit the Code
- Open the
RRDB.pyfile with any text editor (e.g., VS Code, Atom, or even a basic editor like TextEdit).- Find the part that looks like this (usually within a class called
RRDBNet):def forward(self, x): if self.shuffle_factor: # Code here
- Add the line
x = x.contiguous()just belowdef forward(self, x):so it looks like this:def forward(self, x): x = x.contiguous() # Make tensor ready for the next operation if self.shuffle_factor: # Code here
- Then save the file after making the change
- Restart ComfyUI to make sure it picks up the update
Hello, after I modified the RRDB.py file, I lost the node from the image.
Just chiming in on this as this was a helpful thread when I ran into the same issue.
I have a sneaking suspicion that doing a MacOS update broke something for me as I was previously using torch 2.5.x etc and everything was working perfectly well as of Sunday morning.
Then the only change I made to my Mac was to update to Sequoia on Sunday evening and whilst regular image generation worked, upscaling ceased to function and I got the same errors others have mentioned.
My solution was to blow away my venv as I've seen similar issues after a MacOS update and reinstall the dependencies. torch 2.5.x still didn't work so I downlgraded to torch==2.3.1 torchaudio==2.3.1 torchvision==0.18.1 which was the previous requirement for Flux.Dev models and since doing this, everything now works fine.
So if you run into this issue and you've recently upgraded maybe simply try this:
pip install torch==2.3.1 torchaudio==2.3.1 torchvision==0.18.1 in your venv and see if that solves it for you.
When I'm adding the additional line x = x.contiguous() at /miniconda3/lib/python3.12/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py:137 as suggested here, the good thing is that the bug disappeared. During the process execution, when it arrives to the Ultimate SD Upscale node, it seems the node execution is repeated continuously... So I'm never getting a final result on the output.
Am I the only one and any idea to fix this?
I left a comment above. I had this issue on my mac as well as my windows11 fresh-install. Both were resolved by simply downgrading pytorch to 2.4.1. I had not touched anything else as it is working very fine with previous version of pytorch.
https://pytorch.org/get-started/previous-versions/ Visit the above official pytorch site and try to find your os-specific installation instruction.
pip uninstall torch torchvision torchaudio pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 (for mac)
There are different commands for each os, but key point is pytorch=2.4.1. I had no issue ever since that.
@kitmeng
I already described the method to fix this error before. I tried to break it down, make it simpler... so it's easier to understand what I was trying to explain.
Find the File You Need to Edit
You’re looking for a file called
RRDB.pyin the package used by UltimateSDUpscale and ComfyUI. It should be in a path like this. I used some variables in the path below, as I don't know how your installation path looks like ...
[YourCondaPath]/envs/[YourEnvName]/lib/python3.x/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.pyReplace:
[YourCondaPath]with the path where Conda is installed (like~/anaconda3).[YourEnvName]with the name of your Conda environment.python3.xwith your Python version (e.g.,python3.10).You can find your conda path by running
conda info --baseNote: If you don't use Conda, go to the path where python is installed on your system.
Edit the Code
- Open the
RRDB.pyfile with any text editor (e.g., VS Code, Atom, or even a basic editor like TextEdit).- Find the part that looks like this (usually within a class called
RRDBNet):def forward(self, x): if self.shuffle_factor: # Code here
- Add the line
x = x.contiguous()just belowdef forward(self, x):so it looks like this:def forward(self, x): x = x.contiguous() # Make tensor ready for the next operation if self.shuffle_factor: # Code here
- Then save the file after making the change
- Restart ComfyUI to make sure it picks up the update
it helped!!!! thank you so much ☺️
Hi all. I've updated RRDB.py file but when I reopen the ComfyUI I get:
"Missing Node Types! -UltimateSDUpscales -UpscaleModelLoader" notification.
Installing these again with Model Manager (Fix It), ComfyUI launches without failure notification but the file gets back to original (without "x = x.contiguous()" value... I see that whenever I change anything in RRDB.py, ComfyUI gets node/model error.
Any ideas? I thought about changing Python to 2.4.1 but I'm worried that it either not fix the issue ot get issues with the system itself...
I'm using Mac Studio M1 Max, Python 3.13.1, ComfyUI: v0.3.9-10-g57f330c, Manager: V2.55.5
I left a comment above. I had this issue on my mac as well as my windows11 fresh-install. Both were resolved by simply downgrading pytorch to 2.4.1. I had not touched anything else as it is working very fine with previous version of pytorch.
https://pytorch.org/get-started/previous-versions/ Visit the above official pytorch site and try to find your os-specific installation instruction.
pip uninstall torch torchvision torchaudio pip install torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1 (for mac)
There are different commands for each os, but key point is pytorch=2.4.1. I had no issue ever since that.
This fixed for me too! I had Pytorch 2.5.1 installed (ComfyUI installed without conda on a Mac Mini M4, Mac OS 15.1.1)
x = x.contiguous() works for me... where can we submit a PR, it's in pytorch?
Not sure if this helps, but I had the exact same error. Also with UltimateSDUpscale.
The error occurs because the tensor is not stored contiguously in memory when the
.view()operation is called. To fix this, you need to ensure the tensor is contiguous by adding.contiguous()before the operation.
- Locate the
RRDB.pyfile in the ESRGAN architecture of thespandrelpackage. It's typically found in:[your Python environment]/site-packages/spandrel/architectures/ESRGAN/__arch/RRDB.py- Open the
RRDB.pyfile in a text editor.- Modify the
forwardmethod of theRRDBNetclass by addingx = x.contiguous()at the beginning of the method. It should look like this: def forward(self, x): x = x.contiguous() <------- if self.shuffle_factor: _, _, h, w = x.size() x = pad_to_multiple(x, self.shuffle_factor, mode="reflect") x = torch.pixel_unshuffle(x, downscale_factor=self.shuffle_factor) x = self.model(x) return x[:, :, : h * self.scale, : w * self.scale] return self.model(x)- Save the file and restart ComfyUI.
Hope this helps!
god bless your soul, it worked, and I don't even have to downgrade and reinstall my latest Pyrthon.
Hi all. I've updated RRDB.py file but when I reopen the ComfyUI I get:
"Missing Node Types! -UltimateSDUpscales -UpscaleModelLoader" notification.
Installing these again with Model Manager (Fix It), ComfyUI launches without failure notification but the file gets back to original (without "x = x.contiguous()" value... I see that whenever I change anything in RRDB.py, ComfyUI gets node/model error.
Any ideas? I thought about changing Python to 2.4.1 but I'm worried that it either not fix the issue ot get issues with the system itself...
I'm using Mac Studio M1 Max, Python 3.13.1, ComfyUI: v0.3.9-10-g57f330c, Manager: V2.55.5
When you edit the file in a text editor, be careful to use spaces and not the tab, although it will appear to have the same indentation.
Just chiming in on this as this was a helpful thread when I ran into the same issue.
I have a sneaking suspicion that doing a MacOS update broke something for me as I was previously using torch 2.5.x etc and everything was working perfectly well as of Sunday morning.
Then the only change I made to my Mac was to update to Sequoia on Sunday evening and whilst regular image generation worked, upscaling ceased to function and I got the same errors others have mentioned.
My solution was to blow away my venv as I've seen similar issues after a MacOS update and reinstall the dependencies. torch 2.5.x still didn't work so I downlgraded to
torch==2.3.1 torchaudio==2.3.1 torchvision==0.18.1which was the previous requirement for Flux.Dev models and since doing this, everything now works fine.So if you run into this issue and you've recently upgraded maybe simply try this:
pip install torch==2.3.1 torchaudio==2.3.1 torchvision==0.18.1in your venv and see if that solves it for you.
thanks, I was able to fix after downgrade. Hoping a fix in torch in later versions.