Thiết lập python py egg_info không chạy thành công mac m1

Cảm ơn vì những hướng dẫn chi tiết. Thật không may, tôi đang gặp khó khăn khi tạo môi trường trong đó pip không thành công với thông báo bên dưới. Bất kỳ suy nghĩ về làm thế nào để vượt qua rào cản này?

[Ghi chú. Nó dường như là một vấn đề với onnx. Tôi đã thử một phiên bản pip install onnx và mọi phiên bản đều không thành công. ]

Pip subprocess error:
  Running command git fetch -q --tags
  Running command git reset --hard -q 24268930bf1dce879235a7fddd0b2355b84d7ea6
  Running command git fetch -q --tags
  Running command git reset --hard -q d50d76daa670286dd6cacf3bcd80b5e4823fc8e1
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [7 lines of output]
      fatal: not a git repository [or any of the parent directories]: .git
      Traceback [most recent call last]:
        File "", line 2, in 
        File "", line 34, in 
        File "/private/var/folders/kk/qyr1f5dj017b338m860tt9dm0000gn/T/pip-install-5of30ges/onnx_8af078f05ebe4736b1b65355c7b7406b/setup.py", line 81, in 
          assert CMAKE, "Could not find cmake executable!"
      AssertionError: Could not find cmake executable!
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Xin chào, cảm ơn vì hướng dẫn, tôi vẫn chưa làm được. tôi gặp lỗi này

FileNotFoundError: [Errno 2] No such file or directory: 'sd-v1-4.ckpt'

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Chỉnh sửa.
Tôi không biết mình đã làm gì, nhưng giờ đây là lỗi

FileNotFoundError: [Errno 2] No such file or directory: 'models/ldm/stable-diffusion-v1/model.ckpt'

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Chỉnh sửa.
Tôi đã tìm thấy tệp ở một nơi khác trên máy Mac của mình và đặt tệp vào đúng thư mục rồi đổi tên thành mô hình. ckpt, nhưng nó dẫn đến lỗi sau.

OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from '//huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Không thực sự chắc chắn làm thế nào tôi có thể tiến hành từ đây để thử và làm cho nó hoạt động

Một số vấn đề khác tôi gặp phải trên đường đi

  • Tên nhánh có vẻ là apple-mps-support chứ không phải apple-silicon-mps-support
  • Không có tập lệnh nào có tên txt2img. py trong/scripts, nhưng có trong/scripts/orig_scripts, tuy nhiên, nó không hoạt động với tôi. Có một kịch bản mới để thay thế nó?

Cảm ơn vì những hướng dẫn chi tiết

sau khi thiết lập môi trường

bước cuối cùng.
______9

lỗi

Loading model from sd-v1-4.ckpt
Global Step: 470000
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape [1, 4, 32, 32] = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Traceback [most recent call last]:
  File "/Users/tangsir/Downloads/tools/stable-diffusion/scripts/orig_scripts/txt2img.py", line 327, in 
    main[]
  File "/Users/tangsir/Downloads/tools/stable-diffusion/scripts/orig_scripts/txt2img.py", line 203, in main
    model = load_model_from_config[config, f"{opt.ckpt}"]
  File "/Users/tangsir/Downloads/tools/stable-diffusion/scripts/orig_scripts/txt2img.py", line 42, in load_model_from_config
    model = instantiate_from_config[config.model]
  File "/Users/tangsir/Downloads/tools/stable-diffusion/ldm/util.py", line 89, in instantiate_from_config
    return get_obj_from_str[config['target']][
  File "/Users/tangsir/Downloads/tools/stable-diffusion/ldm/models/diffusion/ddpm.py", line 657, in __init__
    self.instantiate_cond_stage[cond_stage_config]
  File "/Users/tangsir/Downloads/tools/stable-diffusion/ldm/models/diffusion/ddpm.py", line 768, in instantiate_cond_stage
    model = instantiate_from_config[config]
  File "/Users/tangsir/Downloads/tools/stable-diffusion/ldm/util.py", line 89, in instantiate_from_config
    return get_obj_from_str[config['target']][
  File "/Users/tangsir/Downloads/tools/stable-diffusion/ldm/modules/encoders/modules.py", line 253, in __init__
    self.tokenizer = CLIPTokenizer.from_pretrained[
  File "/Users/tangsir/opt/anaconda3/envs/ldm/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1768, in from_pretrained
    raise EnvironmentError[
OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from '//huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Có phải những người khác đang gặp sự cố với grpcio không? . Nhưng nó vẫn sẽ tải xuống phiên bản mới nhất không thành công trên máy mac M1 của tôi

conda list grpcio

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Hiển thị phiên bản đã cài đặt là 1. 42. 0 nhưng tôi vẫn gặp lỗi này

Collecting grpcio>=1.24.3
  Downloading grpcio-1.47.0.tar.gz [21.9 MB]
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.9/21.9 MB 40.0 MB/s eta 0:00:00
  Preparing metadata [setup.py]: started
  Preparing metadata [setup.py]: finished with status 'error'

Pip subprocess error:
  Running command git fetch -q --tags
  Running command git reset --hard -q 24268930bf1dce879235a7fddd0b2355b84d7ea6
  Running command git fetch -q --tags
  Running command git reset --hard -q d50d76daa670286dd6cacf3bcd80b5e4823fc8e1
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Traceback [most recent call last]:
        File "", line 2, in 
        File "", line 34, in 
        File "/private/var/folders/3s/zhffdtdn241f_m_jvjz9qsxw0000gn/T/pip-install-gizrp4u0/grpcio_e54571b9c9134f0a854bb64e8c0605c2/setup.py", line 263, in 
          if check_linker_need_libatomic[]:
        File "/private/var/folders/3s/zhffdtdn241f_m_jvjz9qsxw0000gn/T/pip-install-gizrp4u0/grpcio_e54571b9c9134f0a854bb64e8c0605c2/setup.py", line 219, in check_linker_need_libatomic
          cpp_test = subprocess.Popen[
        File "~/opt/miniconda3/envs/ldm/lib/python3.10/subprocess.py", line 966, in __init__
          self._execute_child[args, executable, preexec_fn, close_fds,
        File "~/opt/miniconda3/envs/ldm/lib/python3.10/subprocess.py", line 1717, in _execute_child
          and os.path.dirname[executable]
        File "~/opt/miniconda3/envs/ldm/lib/python3.10/posixpath.py", line 152, in dirname
          p = os.fspath[p]
      TypeError: expected str, bytes or os.PathLike object, not list
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

failed

CondaEnvException: Pip failed

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Tôi gặp một lỗi lạ khi thử và chạy tập lệnh python

Tôi có một chiếc Apple Macbook Pro M1 với 64GB ram


[ldm] thomaspetersen@MacBook-Pro stable-diffusion % curl "//www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media" > sd-v1-4.ckpt
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4067M  100 4067M    0     0  63.4M      0  0:01:04  0:01:04 --:--:-- 64.5M
[ldm] thomaspetersen@MacBook-Pro stable-diffusion % python scripts/txt2img.py --prompt "a drawing of web developers" --plms --ckpt sd-v1-4.ckpt --skip_grid --n_samples 1
Intel MKL FATAL ERROR: This system does not meet the minimum requirements for use of the Intel[R] Math Kernel Library.
The processor must support the Intel[R] Supplemental Streaming SIMD Extensions 3 [Intel[R] SSSE3] instructions.
The processor must support the Intel[R] Streaming SIMD Extensions 4.2 [Intel[R] SSE4.2] instructions.
The processor must support the Intel[R] Advanced Vector Extensions [Intel[R] AVX] instructions.
[ldm] thomaspetersen@MacBook-Pro stable-diffusion % wget //repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh

Vào chế độ toàn màn hình Thoát chế độ toàn màn hình

Xin chào, tôi đang gặp sự cố khi chạy txt2img

[ldm] robert@Robertos-MBP khuếch tán ổn định % python scripts/orig_scripts/txt2img. py --prompt "bản vẽ khuôn mặt của Elon Musk" --plms --ckpt sd-v1-4. ckpt --skip_grid --n_samples 1
Đang tải mô hình từ sd-v1-4. ckpt
Bước toàn cầu. 470000
Khuếch tán tiềm ẩn. Đang chạy ở chế độ dự đoán eps
DiffusionWrapper có 859. 52 thông số M.
tạo sự chú ý của loại 'vani' với 512 kênh trong_kênh
Làm việc với z của hình dạng [1, 4, 32, 32] = 4096 kích thước.
tạo sự chú ý thuộc loại 'vanilla' với 512 kênh trong_kênh
Truy nguyên [lần gọi cuối cùng gần đây nhất].
Tệp "/Users/robert/Documents/workspace/stable-diffusion/scripts/orig_scripts/txt2img. py", dòng 319, trong
main[]
File "/Users/robert/Documents/workspace/stable-diffusion/scripts/orig_scripts/txt2img. py", dòng 195, trong main
model = load_model_from_config[config, f"{opt. ckpt}"]
Tệp "/Users/robert/Documents/workspace/stable-diffusion/scripts/orig_scripts/txt2img. py", dòng 34, trong load_model_from_config
model = instantiate_from_config[config. model]
Tệp "/Users/robert/Documents/workspace/stable-diffusion/ldm/util. py", dòng 89, trong instantiate_from_config
return get_obj_from_str[config['target']][
File "/Users/robert/Documents/workspace/stable- . py", dòng 657, trong init
self. instantiate_cond_stage[cond_stage_config]
Tệp "/Users/robert/Documents/workspace/stable-diffusion/ldm/models/diffusion/ddpm. py", dòng 768, trong instantiate_cond_stage
model = instantiate_from_config[config]
File "/Users/robert/Documents/workspace/stable-diffusion/ldm/util. py", dòng 89, trong instantiate_from_config
return get_obj_from_str[config['target']][
File "/Users/robert/Documents/workspace/stable- . py", dòng 99, trong get_obj_from_str
return getattr[importlib. import_module[module, package=None], cls]
Tệp "/Users/robert/miniconda3/envs/ldm/lib/python3. 9/nhậplib/init. py", dòng 127, trong import_module
return bootstrap. _gcd_import[tên[cấp độ. ], gói, cấp]
Tệp "", dòng 1030, trong _gcd_import
Tệp "", dòng 1007, trong _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/Users/robert/Documents/workspace/stable-diffusion/ldm/modules/encoders/modules.py", line 6, in
từ máy biến áp nhập CLIPTokenizer, CLIPTextModel
Tệp "/Users/robert/miniconda3/envs/ldm/lib/python3. 9/site-gói/máy biến áp/init_. py", dòng 30, trong
từ. nhập phụ thuộc_versions_check
Tệp "/Users/robert/miniconda3/envs/ldm/lib/python3. 9/site-gói/máy biến áp/phụ thuộc_versions_check. py", dòng 41, trong
require_version_core[deps[pkg]]
Tệp "/Users/robert/miniconda3/envs/ldm/lib/python3. 9/site-gói/máy biến áp/đồ dùng/phiên bản. py", dòng 122, trong require_version_core
return require_version[yêu cầu, gợi ý]
Tệp "/Users/robert/miniconda3/envs/ldm/lib/python3. 9/site-gói/máy biến áp/đồ dùng/phiên bản. py", dòng 116, trong yêu cầu_version
_compare_versions[op, got_ver, want_ver, yêu cầu, pkg, gợi ý]
Tệp "/Users/robert/miniconda3/envs . 9/site-gói/máy biến áp/đồ dùng/phiên bản. py", dòng 49, trong _compare_versions
raise ImportError[
ImportError. mã thông báo>=0. 11. 1,. =0. 11. 3,
Thử. pip install transformers -U hoặc pip install -e '. [dev]' nếu bạn đang làm việc với git main

Chủ Đề