ml-stable-diffusion

(★ 17,961)

Apple Silicon에서 Core ML을 사용하는 Stable Diffusion

파일 탐색기

  • .gitignore
  • ACKNOWLEDGEMENTS
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • LICENSE.md
  • Package.swift
  • README.md
  • requirements.txt
  • setup.py

# 설치 가이드

python
사전 준비물

설치 및 실행 절차

pip install -r requirements.txt

파이썬 의존성 패키지를 설치합니다.

pip install .

파이썬 코어ML 스테이블 디퓨전 패키지를 설치합니다.

핵심 명령어

pip install -r requirements.txt

프로젝트 실행에 필요한 파이썬 필수 패키지들을 설치합니다.

python -m pip install .

python_coreml_stable_diffusion 패키지를 로컬 환경에 설치합니다.

Apple Silicon Mac 환경 및 macOS 13.1 이상이 필요합니다.

# CDN으로 사용하기

jsDelivr

jsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.

릴리즈 타임라인

명령어 용어집

이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.

🔍

conda activate

설명 보기 ▼

Activate a conda environment.
See also: `conda deactivate`.

conda activate myenv

Activate an existing environment named `myenv`:

conda activate {{path/to/myenv}}

Activate an existing environment located at custom path:

conda activate --stack myenv

Stack `myenv` environment on top of a previous environment making libraries/commands/variables from both accessible:

🔍

conda create

설명 보기 ▼

Create new conda environments.

conda create {{[-y|--yes]}} {{[-n|--name]}} py39 python=3.9 "numpy>=1.11" scipy

Create a new environment named `py39`, install Python 3.9, NumPy v1.11 or above in it, and the latest stable version of SciPy. Say yes to all confirmations:

conda create {{[-n|--name]}} myenv --file {{file1.yml}} --file {{file2.yml}}

Create a new environment named `myenv` and install packages listed in files:

conda create {{[-p|--prefix]}} {{path/to/myenv}}

Create a new environment at a custom path (i.e. prefix):

🔍

git clone

설명 보기 ▼

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

🔍

git lfs

설명 보기 ▼

Work with large files in Git repositories.

git lfs install

Initialize Git LFS:

git lfs track '{{*.bin}}'

Track files that match a glob:

git config {{[-f|--file]}} .lfsconfig lfs.url {{lfs_endpoint_url}}

Change the Git LFS endpoint URL (useful if the LFS server is separate from the Git server):

🔍

git

설명 보기 ▼

분산 버전 관리 시스템.
`commit`, `add`, `branch`, `checkout`, `push` 등의 특정 하위 명령어는 고유의 문서가 따로 있습니다.
더 많은 정보: <https://git-scm.com/docs/git>.

git init

하위 명령어 실행:

git clone {{https://example.com/repo.git}}

특정 레파지토리 위치에서 Git 하위 명령어 실행:

git status

주어진 설정으로 Git 하위 명령어 실행:

🔍

huggingface-cli

설명 보기 ▼

이 명령은 `hf`의 별칭입니다.

tldr hf

자세한 내용은 원본 명령을 참고하세요:

🔍

pip install

설명 보기 ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

python

설명 보기 ▼

Python 언어 인터프리터.
더 많은 정보: <https://docs.python.org/using/cmdline.html>.

python

REPL(대화형 셸) 시작:

python {{path/to/file.py}}

특정 Python 파일 실행:

python -i {{path/to/file.py}}

특정 Python 파일 실행 후 REPL 시작:

🔍

swift

설명 보기 ▼

Swift 프로젝트를 생성, 실행 및 빌드.
더 많은 정보: <https://manned.org/swiftc>.

swift repl

REPL(대화형 셸) 시작:

swift {{file.swift}}

프로그램 실행:

swift package init

패키지 관리자로 새 프로젝트 시작:

// repository documentation