-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dream raise ImportError: cannot import name 'TypeAlias' from 'typing' on M1 #335
Comments
using python 3.10.4 does not solve, creation of the environment fail sed -E 's/python==3.9.13/python==3.10.4/' environment-mac.yaml > /tmp/environment-mac-patched.yml failed CondaEnvException: Pip failed |
i'm going to test the other way (https://news.ycombinator.com/item?id=32684850). . and report (before) from typing import Optional, Callable, TypeAlias |
I confirm that patching ./src/k_diffusion/sampling.py b/k_diffusion/sampling.py solve the issue diff --git a/k_diffusion/sampling.py b/k_diffusion/sampling.py from . import utils |
ok I wiill follow #317 for seed in dream.py issue |
Describe your environment
Mac Studio M1 Ultra 128G
Describe the bug
dream raise ImportError: cannot import name 'TypeAlias' from 'typing' on M1
To Reproduce
conda deactivate
conda env remove -n ldm-last
git clone https://github.com/lstein/stable-diffusion.git ldm-last
cd ldm-last
conda clean --yes --all
mkdir -p models/ldm/stable-diffusion-v1
cd models/ldm/stable-diffusion-v1
ln -s ~/Code/Ai/Models/sd-v1-4.ckpt model.ckpt
cd ../../..
CONDA_SUBDIR=osx-arm64 conda env create -f environment-mac.yaml -n ldm-last
conda activate ldm-last
python scripts/preload_models.py
python scripts/dream.py --full_precision
Expected behavior
dream prompt
Screenshots
python scripts/dream.py --full_precision
Traceback (most recent call last):
File "/Users/ivano/Code/Ai/ldm-last/scripts/dream.py", line 553, in
main()
File "/Users/ivano/Code/Ai/ldm-last/scripts/dream.py", line 41, in main
from ldm.simplet2i import T2I
File "/Users/ivano/Code/Ai/ldm-last/ldm/simplet2i.py", line 29, in
from ldm.models.diffusion.ksampler import KSampler
File "/Users/ivano/Code/Ai/ldm-last/ldm/models/diffusion/ksampler.py", line 2, in
import k_diffusion as K
File "/Users/ivano/Code/Ai/ldm-last/src/k-diffusion/k_diffusion/init.py", line 1, in
from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
File "/Users/ivano/Code/Ai/ldm-last/src/k-diffusion/k_diffusion/external.py", line 6, in
from . import sampling, utils
File "/Users/ivano/Code/Ai/ldm-last/src/k-diffusion/k_diffusion/sampling.py", line 10, in
from typing import Optional, Callable, TypeAlias
ImportError: cannot import name 'TypeAlias' from 'typing' (/Users/ivano/.miniconda/envs/ldm-last/lib/python3.9/typing.py)
Additional context
The text was updated successfully, but these errors were encountered: