← All tasks
pythonComfy-Org/ComfyUI #6169Not a task: not reproduced

ComfyUI is currently broken with python 3.13

envgap__Comfy-Org__ComfyUI-6169

Original GitHub issue ↗Opened 2024-12-23

01 / FAILURE SIGNATURE

As reported upstream

ModuleNotFoundError: No module named 'torchvision'
Not a benchmark task.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
requirements.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

Comfy-Org/ComfyUI #6169 · read the original issue
### Expected Behavior



for it to work.



### Actual Behavior



errors out with multiple missing modules mainly though 



ModuleNotFoundError: No module named 'torchvision'



### Steps to Reproduce



upgrade python from 3.12 to 3.13



### Debug Logs



```powershell

bash /data1/ComfyUI/sdstartupscript.sh 

[START] Security scan

[DONE] Security scan

## ComfyUI-Manager: installing dependencies done.

** ComfyUI startup time: 2024-12-23 02:08:26.865000

** Platform: Linux

** Python version: 3.13.1 (main, Dec  4 2024, 18:05:56) [GCC 14.2.1 20240910]

** Python executable: /data1/ComfyUI/venv/bin/python

** ComfyUI Path: /data1/ComfyUI

** Log path: /data1/ComfyUI/comfyui.log

[manager-core] Failed to restore PyTorch

'torchvision'



Prestartup times for custom nodes:

   0.0 seconds: /data1/ComfyUI/custom_nodes/rgthree-comfy

   0.0 seconds: /data1/ComfyUI/custom_nodes/ComfyUI-Stable-Video-Diffusion

   1.2 seconds: /data1/ComfyUI/custom_nodes/ComfyUI-Manager



Total VRAM 11934 MB, total RAM 64215 MB

pytorch version: 2.5.1+cu124

Set vram state to: NORMAL_VRAM

Device: cuda:0 NVIDIA GeForce RTX 3060 : cudaMallocAsync

Traceback (most recent call last):

  File "/data1/ComfyUI/main.py", line 132, in <module>

    import execution

  File "/data1/ComfyUI/execution.py", line 13, in <module>

    import nodes

  File "/data1/ComfyUI/nodes.py", line 22, in <module>

    import comfy.diffusers_load

  File "/data1/ComfyUI/comfy/diffusers_load.py", line 3, in <module>

    import comfy.sd

  File "/data1/ComfyUI/comfy/sd.py", line 10, in <module>

    from .ldm.cascade.stage_c_coder import StageC_coder

  File "/data1/ComfyUI/comfy/ldm/cascade/stage_c_coder.py", line 19, in <module>

    import torchvision

ModuleNotFoundError: No module named 'torchvision'

```





### Other



i tried to baby the upgrade process.



i did `python3.13 -m venv upgrade (venv directory)` that went smooth.



tried to startup my comfyui starting script once again it errored out.



tried to do `pip install -r requirments.txt` it erorred out with `ERROR: No matching distribution found for torchvision`, i disabled it by adding # before it in the requirments.txt then there was also problems with `torchaudio` `sentencepiece` `koria` `spandrel` and i also disabled `soundfile` just in case at this point, the other packages in the requirments.txt did update to py313 variations.



yet am still stuck ofc because no `torchvision` .



https://github.com/pytorch/vision/issues/8747 



i don't think there is a workaround other than me downgrading to python 3.12 in the meantime i guess, other than that would be to wait for `torchvision` to upgrade, although `torch` is updated btw, am not python programmer so idk the difference.



Kudos.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy already_works is install-only; proposed control still requires runtime verification.