Skip to content

ImportError: cannot import name 'mapped_column' from 'sqlalchemy.orm' #127

@universorum

Description

@universorum

I have alias pip="uv pip"

uv venv --python 3.12 --seed
source .venv/bin/activate

git clone https://github.com/Comfy-Org/ComfyUI
cd ComfyUI/custom_nodes
git clone https://github.com/Comfy-Org/ComfyUI-Manager

uv pip install torch torchvision torchaudio xformers --index-url https://download.pytorch.org/whl/cu130
uv pip install coloredlogs flatbuffers numpy packaging protobuf sympy
uv pip install --pre --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ort-cuda-13-nightly/pypi/simple/ onnxruntime-gpu
uv pip install -r requirements.txt

python main.py --listen --mmap-torch-files --highvram

Now, install ComfyUI-Copilot via ComfyUI-Manager
After restart, got a exception when startup

$ python main.py --listen
Traceback (most recent call last):
  File "/home/user/ai/ComfyUI/main.py", line 10, in <module>
    from app.assets.scanner import seed_assets
  File "/home/user/ai/ComfyUI/app/assets/scanner.py", line 14, in <module>
    from app.assets.database.tags import add_missing_tag_for_asset_id, ensure_tags_exist, remove_missing_tag_for_asset_id
  File "/home/user/ai/ComfyUI/app/assets/database/tags.py", line 8, in <module>
    from app.assets.database.models import Tag, AssetInfoTag, AssetInfo
  File "/home/user/ai/ComfyUI/app/assets/database/models.py", line 21, in <module>
    from sqlalchemy.orm import Mapped, foreign, mapped_column, relationship
ImportError: cannot import name 'mapped_column' from 'sqlalchemy.orm' (/home/user/ai/ComfyUI/.venv/lib/python3.12/site-packages/sqlalchemy/orm/__init__.py)

ENV:
Windows 11
WSL 2
Ubuntu 24.04
CUDA 13.0
Python 3.12 (uv venv)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions