ml-stable-diffusion
Apple Silicon에서 Core ML을 사용하는 Stable Diffusion
파일 탐색기
- pull_request_template.md
- randomSeed_11_computeUnit_CPU_AND_GPU_modelVersion_runwayml_stable-diffusion-v1-5.png
- randomSeed_11_computeUnit_CPU_AND_NE_modelVersion_runwayml_stable-diffusion-v1-5.png
- randomSeed_123456789_computeUnit_ALL_modelVersion_CompVis_stable-diffusion-v1-4.png
- randomSeed_123456789_computeUnit_CPU_AND_GPU_modelVersion_CompVis_stable-diffusion-v1-4.png
- randomSeed_123456789_computeUnit_CPU_AND_NE_modelVersion_CompVis_stable-diffusion-v1-4.png
- randomSeed_93_computeUnit_ALL_modelVersion_stabilityai_stable-diffusion-2-base.png
- randomSeed_93_computeUnit_CPU_AND_GPU_modelVersion_stabilityai_stable-diffusion-2-base.png
- randomSeed_93_computeUnit_CPU_AND_NE_modelVersion_stabilityai_stable-diffusion-2-base.png
- randomSeed_11_computeUnit_CPU_AND_GPU_modelVersion_stabilityai_stable-diffusion-2-base.png
- randomSeed_11_computeUnit_CPU_AND_NE_modelVersion_stabilityai_stable-diffusion-2-base.png
- randomSeed_13_computeUnit_ALL_modelVersion_CompVis_stable-diffusion-v1-4.png
- randomSeed_13_computeUnit_CPU_AND_GPU_modelVersion_CompVis_stable-diffusion-v1-4.png
- randomSeed_13_computeUnit_CPU_AND_NE_modelVersion_CompVis_stable-diffusion-v1-4.png
- randomSeed_93_computeUnit_ALL_modelVersion_runwayml_stable-diffusion-v1-5.png
- randomSeed_93_computeUnit_CPU_AND_GPU_modelVersion_runwayml_stable-diffusion-v1-5.png
- randomSeed_93_computeUnit_CPU_AND_NE_modelVersion_runwayml_stable-diffusion-v1-5.png
- a_high_quality_photo_of_a_surfing_dog.7667.final_3.41-bits.png
- a_high_quality_photo_of_a_surfing_dog.7667.final_4.50-bits.png
- a_high_quality_photo_of_a_surfing_dog.7667.final_6.55-bits.png
- a_high_quality_photo_of_a_surfing_dog.7667.final_float16_original.png
- runwayml_stable-diffusion-v1-5_psnr_vs_size.png
- stabilityai_stable-diffusion-2-1-base_psnr_vs_size.png
- stabilityai_stable-diffusion-xl-base-1.0_psnr_vs_size.png
- controlnet_readme_reel.png
- float16_cpuandne_readmereel.png
- float16_gpu_readmereel.png
- palette6_cpuandne_readmereel.png
- readme_reel.png
- __init__.py
- _version.py
- activation_quantization.py
- attention.py
- chunk_mlprogram.py
- controlnet.py
- coreml_model.py
- layer_norm.py
- mixed_bit_compression_apply.py
- mixed_bit_compression_pre_analysis.py
- multilingual_projection.py
- pipeline.py
- torch2coreml.py
- unet.py
- CGImage+vImage.swift
- ControlNet.swift
- Decoder.swift
- DiscreteFlowScheduler.swift
- DPMSolverMultistepScheduler.swift
- Encoder.swift
- ManagedMLModel.swift
- MultilingualTextEncoder.swift
- MultiModalDiffusionTransformer.swift
- NumPyRandomSource.swift
- NvRandomSource.swift
- RandomSource.swift
- ResourceManaging.swift
- SafetyChecker.swift
- SampleTimer.swift
- Scheduler.swift
- StableDiffusion3Pipeline+Resources.swift
- StableDiffusion3Pipeline.swift
- StableDiffusionPipeline+Resources.swift
- StableDiffusionPipeline.Configuration.swift
- StableDiffusionPipeline.swift
- StableDiffusionXL+Resources.swift
- StableDiffusionXLPipeline.swift
- TextEncoder.swift
- TextEncoderT5.swift
- TextEncoderXL.swift
- TorchRandomSource.swift
- Unet.swift
- BPETokenizer+Reading.swift
- BPETokenizer.swift
- T5Tokenizer.swift
- main.swift
- merges.txt
- vocab.json
- StableDiffusionTests.swift
- __init__.py
- test_stable_diffusion.py
- .gitignore
- ACKNOWLEDGEMENTS
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE.md
- Package.swift
- README.md
- requirements.txt
- setup.py
# 설치 가이드
python- Python 3.8+
- macOS 13.1+
- coremltools 7.0+
설치 및 실행 절차
pip install -r requirements.txt
파이썬 의존성 패키지를 설치합니다.
pip install .
파이썬 코어ML 스테이블 디퓨전 패키지를 설치합니다.
핵심 명령어
pip install -r requirements.txt
프로젝트 실행에 필요한 파이썬 필수 패키지들을 설치합니다.
python -m pip install .
python_coreml_stable_diffusion 패키지를 로컬 환경에 설치합니다.
# CDN으로 사용하기
jsDelivrjsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.
릴리즈 타임라인
명령어 용어집
이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.
conda activate
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
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
설명 보기 ▼
huggingface-cli
이 명령은 `hf`의 별칭입니다.
tldr hf
자세한 내용은 원본 명령을 참고하세요:
pip install
설명 보기 ▼
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
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
Swift 프로젝트를 생성, 실행 및 빌드.
더 많은 정보: <https://manned.org/swiftc>.
swift repl
REPL(대화형 셸) 시작:
swift {{file.swift}}
프로그램 실행:
swift package init
패키지 관리자로 새 프로젝트 시작:
