1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Init for korean docs (#1910)

* init for korean docs

* edit build yml file for multi language docs

* edit one more build yml file for multi language docs

* add title for get_frontmatter error
This commit is contained in:
Chanran Kim
2023-01-05 06:59:42 +09:00
committed by GitHub
parent 9e17983d9f
commit 75d53cc839
92 changed files with 539 additions and 0 deletions

View File

@@ -13,5 +13,6 @@ jobs:
with:
commit_sha: ${{ github.sha }}
package: diffusers
languages: en ko
secrets:
token: ${{ secrets.HUGGINGFACE_PUSH }}

View File

@@ -14,3 +14,4 @@ jobs:
commit_sha: ${{ github.event.pull_request.head.sha }}
pr_number: ${{ github.event.number }}
package: diffusers
languages: en ko

View File

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 102 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

193
docs/source/ko/_toctree.yml Normal file
View File

@@ -0,0 +1,193 @@
- sections:
- local: index
title: "๐Ÿงจ Diffusers"
- local: quicktour
title: "ํ›‘์–ด๋ณด๊ธฐ"
- local: installation
title: "์„ค์น˜"
title: "์‹œ์ž‘ํ•˜๊ธฐ"
- sections:
- sections:
- local: in_translation
title: "Loading Pipelines, Models, and Schedulers"
- local: in_translation
title: "Using different Schedulers"
- local: in_translation
title: "Configuring Pipelines, Models, and Schedulers"
- local: in_translation
title: "Loading and Adding Custom Pipelines"
title: "๋ถˆ๋Ÿฌ์˜ค๊ธฐ & ํ—ˆ๋ธŒ (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- local: in_translation
title: "Unconditional Image Generation"
- local: in_translation
title: "Text-to-Image Generation"
- local: in_translation
title: "Text-Guided Image-to-Image"
- local: in_translation
title: "Text-Guided Image-Inpainting"
- local: in_translation
title: "Text-Guided Depth-to-Image"
- local: in_translation
title: "Reusing seeds for deterministic generation"
- local: in_translation
title: "Community Pipelines"
- local: in_translation
title: "How to contribute a Pipeline"
title: "์ถ”๋ก ์„ ์œ„ํ•œ ํŒŒ์ดํ”„๋ผ์ธ (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- local: in_translation
title: "Reinforcement Learning"
- local: in_translation
title: "Audio"
- local: in_translation
title: "Other Modalities"
title: "Taking Diffusers Beyond Images"
title: "Diffusers ์‚ฌ์šฉ๋ฒ• (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- local: in_translation
title: "Memory and Speed"
- local: in_translation
title: "xFormers"
- local: in_translation
title: "ONNX"
- local: in_translation
title: "OpenVINO"
- local: in_translation
title: "MPS"
- local: in_translation
title: "Habana Gaudi"
title: "์ตœ์ ํ™”/ํŠน์ˆ˜ ํ•˜๋“œ์›จ์–ด (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- local: in_translation
title: "Overview"
- local: in_translation
title: "Unconditional Image Generation"
- local: in_translation
title: "Textual Inversion"
- local: in_translation
title: "Dreambooth"
- local: in_translation
title: "Text-to-image fine-tuning"
title: "ํ•™์Šต (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- local: in_translation
title: "Stable Diffusion"
- local: in_translation
title: "Philosophy"
- local: in_translation
title: "How to contribute?"
title: "๊ฐœ๋… ์„ค๋ช… (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- sections:
- local: in_translation
title: "Models"
- local: in_translation
title: "Diffusion Pipeline"
- local: in_translation
title: "Logging"
- local: in_translation
title: "Configuration"
- local: in_translation
title: "Outputs"
title: "Main Classes"
- sections:
- local: in_translation
title: "Overview"
- local: in_translation
title: "AltDiffusion"
- local: in_translation
title: "Cycle Diffusion"
- local: in_translation
title: "DDIM"
- local: in_translation
title: "DDPM"
- local: in_translation
title: "Latent Diffusion"
- local: in_translation
title: "Unconditional Latent Diffusion"
- local: in_translation
title: "PaintByExample"
- local: in_translation
title: "PNDM"
- local: in_translation
title: "Score SDE VE"
- sections:
- local: in_translation
title: "Overview"
- local: in_translation
title: "Text-to-Image"
- local: in_translation
title: "Image-to-Image"
- local: in_translation
title: "Inpaint"
- local: in_translation
title: "Depth-to-Image"
- local: in_translation
title: "Image-Variation"
- local: in_translation
title: "Super-Resolution"
title: "Stable Diffusion"
- local: in_translation
title: "Stable Diffusion 2"
- local: in_translation
title: "Safe Stable Diffusion"
- local: in_translation
title: "Stochastic Karras VE"
- local: in_translation
title: "Dance Diffusion"
- local: in_translation
title: "UnCLIP"
- local: in_translation
title: "Versatile Diffusion"
- local: in_translation
title: "VQ Diffusion"
- local: in_translation
title: "RePaint"
- local: in_translation
title: "Audio Diffusion"
title: "ํŒŒ์ดํ”„๋ผ์ธ (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- local: in_translation
title: "Overview"
- local: in_translation
title: "DDIM"
- local: in_translation
title: "DDPM"
- local: in_translation
title: "Singlestep DPM-Solver"
- local: in_translation
title: "Multistep DPM-Solver"
- local: in_translation
title: "Heun Scheduler"
- local: in_translation
title: "DPM Discrete Scheduler"
- local: in_translation
title: "DPM Discrete Scheduler with ancestral sampling"
- local: in_translation
title: "Stochastic Kerras VE"
- local: in_translation
title: "Linear Multistep"
- local: in_translation
title: "PNDM"
- local: in_translation
title: "VE-SDE"
- local: in_translation
title: "IPNDM"
- local: in_translation
title: "VP-SDE"
- local: in_translation
title: "Euler scheduler"
- local: in_translation
title: "Euler Ancestral Scheduler"
- local: in_translation
title: "VQDiffusionScheduler"
- local: in_translation
title: "RePaint Scheduler"
title: "์Šค์ผ€์ค„๋Ÿฌ (๋ฒˆ์—ญ ์˜ˆ์ •)"
- sections:
- local: in_translation
title: "RL Planning"
title: "Experimental Features"
title: "API (๋ฒˆ์—ญ ์˜ˆ์ •)"

View File

@@ -0,0 +1,16 @@
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
# ๋ฒˆ์—ญ์ค‘
์—ด์‹ฌํžˆ ๋ฒˆ์—ญ์„ ์ง„ํ–‰์ค‘์ž…๋‹ˆ๋‹ค. ์กฐ๊ธˆ๋งŒ ๊ธฐ๋‹ค๋ ค์ฃผ์„ธ์š”.
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

63
docs/source/ko/index.mdx Normal file
View File

@@ -0,0 +1,63 @@
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
<p align="center">
<br>
<img src="https://raw.githubusercontent.com/huggingface/diffusers/77aadfee6a891ab9fcfb780f87c693f7a5beeb8e/docs/source/imgs/diffusers_library.jpg" width="400"/>
<br>
</p>
# ๐Ÿงจ Diffusers
๐Ÿค— Diffusers๋Š” ์‚ฌ์ „ํ•™์Šต๋œ ๋น„์ „ ๋ฐ ์˜ค๋””์˜ค ํ™•์‚ฐ ๋ชจ๋ธ์„ ์ œ๊ณตํ•˜๊ณ , ์ถ”๋ก  ๋ฐ ํ•™์Šต์„ ์œ„ํ•œ ๋ชจ๋“ˆ์‹ ๋„๊ตฌ ์ƒ์ž ์—ญํ• ์„ ํ•ฉ๋‹ˆ๋‹ค.
๋ณด๋‹ค ์ •ํ™•ํ•˜๊ฒŒ, ๐Ÿค— Diffusers๋Š” ๋‹ค์Œ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค:
- ๋‹จ ๋ช‡ ์ค„์˜ ์ฝ”๋“œ๋กœ ์ถ”๋ก ์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” ์ตœ์‹  ํ™•์‚ฐ ํŒŒ์ดํ”„๋ผ์ธ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ([**Using Diffusers**](./using-diffusers/conditional_image_generation)๋ฅผ ์‚ดํŽด๋ณด์„ธ์š”) ์ง€์›๋˜๋Š” ๋ชจ๋“  ํŒŒ์ดํ”„๋ผ์ธ๊ณผ ํ•ด๋‹น ๋…ผ๋ฌธ์— ๋Œ€ํ•œ ๊ฐœ์š”๋ฅผ ๋ณด๋ ค๋ฉด [**Pipelines**](#pipelines)์„ ์‚ดํŽด๋ณด์„ธ์š”.
- ์ถ”๋ก ์—์„œ ์†๋„ vs ํ’ˆ์งˆ์˜ ์ ˆ์ถฉ์„ ์œ„ํ•ด ์ƒํ˜ธ๊ตํ™˜์ ์œผ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋‹ค์–‘ํ•œ ๋…ธ์ด์ฆˆ ์Šค์ผ€์ค„๋Ÿฌ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ [**Schedulers**](./api/schedulers/overview)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
- UNet๊ณผ ๊ฐ™์€ ์—ฌ๋Ÿฌ ์œ ํ˜•์˜ ๋ชจ๋ธ์„ end-to-end ํ™•์‚ฐ ์‹œ์Šคํ…œ์˜ ๊ตฌ์„ฑ ์š”์†Œ๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ [**Models**](./api/models)์„ ์ฐธ๊ณ ํ•˜์„ธ์š”.
- ๊ฐ€์žฅ ์ธ๊ธฐ์žˆ๋Š” ํ™•์‚ฐ ๋ชจ๋ธ ํ…Œ์Šคํฌ๋ฅผ ํ•™์Šตํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ฃผ๋Š” ์˜ˆ์ œ๋“ค์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ์ž์„ธํ•œ ๋‚ด์šฉ์€ [**Training**](./training/overview)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
## ๐Ÿงจ Diffusers ํŒŒ์ดํ”„๋ผ์ธ
๋‹ค์Œ ํ‘œ์—๋Š” ๊ณต์‹œ์ ์œผ๋กœ ์ง€์›๋˜๋Š” ๋ชจ๋“  ํŒŒ์ดํ”„๋ผ์ธ, ๊ด€๋ จ ๋…ผ๋ฌธ, ์ง์ ‘ ์‚ฌ์šฉํ•ด ๋ณผ ์ˆ˜ ์žˆ๋Š” Colab ๋…ธํŠธ๋ถ(์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ฒฝ์šฐ)์ด ์š”์•ฝ๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.
| Pipeline | Paper | Tasks | Colab
|---|---|:---:|:---:|
| [alt_diffusion](./api/pipelines/alt_diffusion) | [**AltDiffusion**](https://arxiv.org/abs/2211.06679) | Image-to-Image Text-Guided Generation |
| [audio_diffusion](./api/pipelines/audio_diffusion) | [**Audio Diffusion**](https://github.com/teticio/audio-diffusion.git) | Unconditional Audio Generation | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/teticio/audio-diffusion/blob/master/notebooks/audio_diffusion_pipeline.ipynb)
| [cycle_diffusion](./api/pipelines/cycle_diffusion) | [**Cycle Diffusion**](https://arxiv.org/abs/2210.05559) | Image-to-Image Text-Guided Generation |
| [dance_diffusion](./api/pipelines/dance_diffusion) | [**Dance Diffusion**](https://github.com/williamberman/diffusers.git) | Unconditional Audio Generation |
| [ddpm](./api/pipelines/ddpm) | [**Denoising Diffusion Probabilistic Models**](https://arxiv.org/abs/2006.11239) | Unconditional Image Generation |
| [ddim](./api/pipelines/ddim) | [**Denoising Diffusion Implicit Models**](https://arxiv.org/abs/2010.02502) | Unconditional Image Generation |
| [latent_diffusion](./api/pipelines/latent_diffusion) | [**High-Resolution Image Synthesis with Latent Diffusion Models**](https://arxiv.org/abs/2112.10752)| Text-to-Image Generation |
| [latent_diffusion](./api/pipelines/latent_diffusion) | [**High-Resolution Image Synthesis with Latent Diffusion Models**](https://arxiv.org/abs/2112.10752)| Super Resolution Image-to-Image |
| [latent_diffusion_uncond](./api/pipelines/latent_diffusion_uncond) | [**High-Resolution Image Synthesis with Latent Diffusion Models**](https://arxiv.org/abs/2112.10752) | Unconditional Image Generation |
| [paint_by_example](./api/pipelines/paint_by_example) | [**Paint by Example: Exemplar-based Image Editing with Diffusion Models**](https://arxiv.org/abs/2211.13227) | Image-Guided Image Inpainting |
| [pndm](./api/pipelines/pndm) | [**Pseudo Numerical Methods for Diffusion Models on Manifolds**](https://arxiv.org/abs/2202.09778) | Unconditional Image Generation |
| [score_sde_ve](./api/pipelines/score_sde_ve) | [**Score-Based Generative Modeling through Stochastic Differential Equations**](https://openreview.net/forum?id=PxTIG12RRHS) | Unconditional Image Generation |
| [score_sde_vp](./api/pipelines/score_sde_vp) | [**Score-Based Generative Modeling through Stochastic Differential Equations**](https://openreview.net/forum?id=PxTIG12RRHS) | Unconditional Image Generation |
| [stable_diffusion](./api/pipelines/stable_diffusion/text2img) | [**Stable Diffusion**](https://stability.ai/blog/stable-diffusion-public-release) | Text-to-Image Generation | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb)
| [stable_diffusion](./api/pipelines/stable_diffusion/img2img) | [**Stable Diffusion**](https://stability.ai/blog/stable-diffusion-public-release) | Image-to-Image Text-Guided Generation | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/image_2_image_using_diffusers.ipynb)
| [stable_diffusion](./api/pipelines/stable_diffusion/inpaint) | [**Stable Diffusion**](https://stability.ai/blog/stable-diffusion-public-release) | Text-Guided Image Inpainting | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb)
| [stable_diffusion_2](./api/pipelines/stable_diffusion_2) | [**Stable Diffusion 2**](https://stability.ai/blog/stable-diffusion-v2-release) | Text-to-Image Generation |
| [stable_diffusion_2](./api/pipelines/stable_diffusion_2) | [**Stable Diffusion 2**](https://stability.ai/blog/stable-diffusion-v2-release) | Text-Guided Image Inpainting |
| [stable_diffusion_2](./api/pipelines/stable_diffusion_2) | [**Stable Diffusion 2**](https://stability.ai/blog/stable-diffusion-v2-release) | Text-Guided Super Resolution Image-to-Image |
| [stable_diffusion_safe](./api/pipelines/stable_diffusion_safe) | [**Safe Stable Diffusion**](https://arxiv.org/abs/2211.05105) | Text-Guided Generation | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ml-research/safe-latent-diffusion/blob/main/examples/Safe%20Latent%20Diffusion.ipynb)
| [stochastic_karras_ve](./api/pipelines/stochastic_karras_ve) | [**Elucidating the Design Space of Diffusion-Based Generative Models**](https://arxiv.org/abs/2206.00364) | Unconditional Image Generation |
| [unclip](./api/pipelines/unclip) | [Hierarchical Text-Conditional Image Generation with CLIP Latents](https://arxiv.org/abs/2204.06125) | Text-to-Image Generation |
| [versatile_diffusion](./api/pipelines/versatile_diffusion) | [Versatile Diffusion: Text, Images and Variations All in One Diffusion Model](https://arxiv.org/abs/2211.08332) | Text-to-Image Generation |
| [versatile_diffusion](./api/pipelines/versatile_diffusion) | [Versatile Diffusion: Text, Images and Variations All in One Diffusion Model](https://arxiv.org/abs/2211.08332) | Image Variations Generation |
| [versatile_diffusion](./api/pipelines/versatile_diffusion) | [Versatile Diffusion: Text, Images and Variations All in One Diffusion Model](https://arxiv.org/abs/2211.08332) | Dual Image and Text Guided Generation |
| [vq_diffusion](./api/pipelines/vq_diffusion) | [Vector Quantized Diffusion Model for Text-to-Image Synthesis](https://arxiv.org/abs/2111.14822) | Text-to-Image Generation |
**์ฐธ๊ณ **: ํŒŒ์ดํ”„๋ผ์ธ์€ ํ•ด๋‹น ๋ฌธ์„œ์— ์„ค๋ช…๋œ ๋Œ€๋กœ ํ™•์‚ฐ ์‹œ์Šคํ…œ์„ ์‚ฌ์šฉํ•œ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ๊ฐ„๋‹จํ•œ ์˜ˆ์ž…๋‹ˆ๋‹ค.

View File

@@ -0,0 +1,142 @@
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
# ์„ค์น˜
์‚ฌ์šฉํ•˜์‹œ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋งž๋Š” ๐Ÿค— Diffusers๋ฅผ ์„ค์น˜ํ•˜์„ธ์š”.
๐Ÿค— Diffusers๋Š” Python 3.7+, PyTorch 1.7.0+ ๋ฐ flax์—์„œ ํ…Œ์ŠคํŠธ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ค‘์ธ ๋”ฅ๋Ÿฌ๋‹ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์— ๋Œ€ํ•œ ์•„๋ž˜์˜ ์„ค์น˜ ์•ˆ๋‚ด๋ฅผ ๋”ฐ๋ฅด์„ธ์š”.
- [PyTorch ์„ค์น˜ ์•ˆ๋‚ด](https://pytorch.org/get-started/locally/)
- [Flax ์„ค์น˜ ์•ˆ๋‚ด](https://flax.readthedocs.io/en/latest/)
## pip๋ฅผ ์ด์šฉํ•œ ์„ค์น˜
[๊ฐ€์ƒ ํ™˜๊ฒฝ](https://docs.python.org/3/library/venv.html)์— ๐Ÿค— Diffusers๋ฅผ ์„ค์น˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
Python ๊ฐ€์ƒ ํ™˜๊ฒฝ์— ์ต์ˆ™ํ•˜์ง€ ์•Š์€ ๊ฒฝ์šฐ [๊ฐ€์ƒํ™˜๊ฒฝ pip ์„ค์น˜ ๊ฐ€์ด๋“œ](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/)๋ฅผ ์‚ดํŽด๋ณด์„ธ์š”.
๊ฐ€์ƒ ํ™˜๊ฒฝ์„ ์‚ฌ์šฉํ•˜๋ฉด ์„œ๋กœ ๋‹ค๋ฅธ ํ”„๋กœ์ ํŠธ๋ฅผ ๋” ์‰ฝ๊ฒŒ ๊ด€๋ฆฌํ•˜๊ณ , ์ข…์†์„ฑ๊ฐ„์˜ ํ˜ธํ™˜์„ฑ ๋ฌธ์ œ๋ฅผ ํ”ผํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ํ”„๋กœ์ ํŠธ ๋””๋ ‰ํ† ๋ฆฌ์— ๊ฐ€์ƒ ํ™˜๊ฒฝ์„ ์ƒ์„ฑํ•˜๋Š” ๊ฒƒ์œผ๋กœ ์‹œ์ž‘ํ•˜์„ธ์š”:
```bash
python -m venv .env
```
๊ทธ๋ฆฌ๊ณ  ๊ฐ€์ƒ ํ™˜๊ฒฝ์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค:
```bash
source .env/bin/activate
```
์ด์ œ ๋‹ค์Œ์˜ ๋ช…๋ น์–ด๋กœ ๐Ÿค— Diffusers๋ฅผ ์„ค์น˜ํ•  ์ค€๋น„๊ฐ€ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค:
**PyTorch์˜ ๊ฒฝ์šฐ**
```bash
pip install diffusers["torch"]
```
**Flax์˜ ๊ฒฝ์šฐ**
```bash
pip install diffusers["flax"]
```
## ์†Œ์Šค๋กœ๋ถ€ํ„ฐ ์„ค์น˜
์†Œ์Šค์—์„œ `diffusers`๋ฅผ ์„ค์น˜ํ•˜๊ธฐ ์ „์—, `torch` ๋ฐ `accelerate`์ด ์„ค์น˜๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”.
`torch` ์„ค์น˜์— ๋Œ€ํ•ด์„œ๋Š” [torch docs](https://pytorch.org/get-started/locally/#start-locally)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
๋‹ค์Œ๊ณผ ๊ฐ™์ด `accelerate`์„ ์„ค์น˜ํ•˜์„ธ์š”.
```bash
pip install accelerate
```
๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์†Œ์Šค์—์„œ ๐Ÿค— Diffusers๋ฅผ ์„ค์น˜ํ•˜์„ธ์š”:
```bash
pip install git+https://github.com/huggingface/diffusers
```
์ด ๋ช…๋ น์–ด๋Š” ์ตœ์‹  `stable` ๋ฒ„์ „์ด ์•„๋‹Œ ์ตœ์ฒจ๋‹จ `main` ๋ฒ„์ „์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.
`main` ๋ฒ„์ „์€ ์ตœ์‹  ๊ฐœ๋ฐœ ์ •๋ณด๋ฅผ ์ตœ์‹  ์ƒํƒœ๋กœ ์œ ์ง€ํ•˜๋Š” ๋ฐ ์œ ์šฉํ•ฉ๋‹ˆ๋‹ค.
์˜ˆ๋ฅผ ๋“ค์–ด ๋งˆ์ง€๋ง‰ ๊ณต์‹ ๋ฆด๋ฆฌ์ฆˆ ์ดํ›„ ๋ฒ„๊ทธ๊ฐ€ ์ˆ˜์ •๋˜์—ˆ์ง€๋งŒ, ์ƒˆ ๋ฆด๋ฆฌ์ฆˆ๊ฐ€ ์•„์ง ์ถœ์‹œ๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋‚˜ ์ด๋Š” `main` ๋ฒ„์ „์ด ํ•ญ์ƒ ์•ˆ์ •์ ์ด์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Œ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
์šฐ๋ฆฌ๋Š” `main` ๋ฒ„์ „์ด ์ง€์†์ ์œผ๋กœ ์ž‘๋™ํ•˜๋„๋ก ๋…ธ๋ ฅํ•˜๊ณ  ์žˆ์œผ๋ฉฐ, ๋Œ€๋ถ€๋ถ„์˜ ๋ฌธ์ œ๋Š” ๋ณดํ†ต ๋ช‡ ์‹œ๊ฐ„ ๋˜๋Š” ํ•˜๋ฃจ ์•ˆ์— ํ•ด๊ฒฐ๋ฉ๋‹ˆ๋‹ค.
๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด ๋” ๋นจ๋ฆฌ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ๋„๋ก [Issue](https://github.com/huggingface/transformers/issues)๋ฅผ ์—ด์–ด์ฃผ์„ธ์š”!
## ํŽธ์ง‘๊ฐ€๋Šฅํ•œ ์„ค์น˜
๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•˜๋ ค๋ฉด ํŽธ์ง‘๊ฐ€๋Šฅํ•œ ์„ค์น˜๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค:
* ์†Œ์Šค ์ฝ”๋“œ์˜ `main` ๋ฒ„์ „์„ ์‚ฌ์šฉ
* ๐Ÿค— Diffusers์— ๊ธฐ์—ฌ (์ฝ”๋“œ์˜ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ํ…Œ์ŠคํŠธํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”)
์ €์žฅ์†Œ๋ฅผ ๋ณต์ œํ•˜๊ณ  ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๐Ÿค— Diffusers๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค:
```bash
git clone https://github.com/huggingface/diffusers.git
cd diffusers
```
**PyTorch์˜ ๊ฒฝ์šฐ**
```
pip install -e ".[torch]"
```
**Flax์˜ ๊ฒฝ์šฐ**
```
pip install -e ".[flax]"
```
์ด๋Ÿฌํ•œ ๋ช…๋ น์–ด๋“ค์€ ์ €์žฅ์†Œ๋ฅผ ๋ณต์ œํ•œ ํด๋”์™€ Python ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ฒฝ๋กœ๋ฅผ ์—ฐ๊ฒฐํ•ฉ๋‹ˆ๋‹ค.
Python์€ ์ด์ œ ์ผ๋ฐ˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ฒฝ๋กœ์— ๋”ํ•˜์—ฌ ๋ณต์ œํ•œ ํด๋” ๋‚ด๋ถ€๋ฅผ ์‚ดํŽด๋ด…๋‹ˆ๋‹ค.
์˜ˆ๋ฅผ๋“ค์–ด Python ํŒจํ‚ค์ง€๊ฐ€ `~/anaconda3/envs/main/lib/python3.7/site-packages/`์— ์„ค์น˜๋˜์–ด ์žˆ๋Š” ๊ฒฝ์šฐ Python์€ ๋ณต์ œํ•œ ํด๋”์ธ `~/diffusers/`๋„ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค.
<Tip warning={true}>
๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ๊ณ„์† ์‚ฌ์šฉํ•˜๋ ค๋ฉด `diffusers` ํด๋”๋ฅผ ์œ ์ง€ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
</Tip>
์ด์ œ ๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ตœ์‹  ๋ฒ„์ „์˜ ๐Ÿค— Diffusers๋กœ ์‰ฝ๊ฒŒ ์—…๋ฐ์ดํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```bash
cd ~/diffusers/
git pull
```
์ด๋ ‡๊ฒŒ ํ•˜๋ฉด, ๋‹ค์Œ์— ์‹คํ–‰ํ•  ๋•Œ Python ํ™˜๊ฒฝ์ด ๐Ÿค— Diffusers์˜ `main` ๋ฒ„์ „์„ ์ฐพ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
## ํ…”๋ ˆ๋ฉ”ํŠธ๋ฆฌ ๋กœ๊น…์— ๋Œ€ํ•œ ์•Œ๋ฆผ
์šฐ๋ฆฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋Š” `from_pretrained()` ์š”์ฒญ ์ค‘์— ํ…”๋ ˆ๋ฉ”ํŠธ๋ฆฌ ์ •๋ณด๋ฅผ ์›๊ฒฉ์œผ๋กœ ์ˆ˜์ง‘ํ•ฉ๋‹ˆ๋‹ค.
์ด ๋ฐ์ดํ„ฐ์—๋Š” Diffusers ๋ฐ PyTorch/Flax์˜ ๋ฒ„์ „, ์š”์ฒญ๋œ ๋ชจ๋ธ ๋˜๋Š” ํŒŒ์ดํ”„๋ผ์ธ ํด๋ž˜์Šค, ๊ทธ๋ฆฌ๊ณ  ํ—ˆ๋ธŒ์—์„œ ํ˜ธ์ŠคํŒ…๋˜๋Š” ๊ฒฝ์šฐ ์‚ฌ์ „ํ•™์Šต๋œ ์ฒดํฌํฌ์ธํŠธ์— ๋Œ€ํ•œ ๊ฒฝ๋กœ๋ฅผ ํฌํ•จํ•ฉ๋‹ˆ๋‹ค.
์ด ์‚ฌ์šฉ ๋ฐ์ดํ„ฐ๋Š” ๋ฌธ์ œ๋ฅผ ๋””๋ฒ„๊น…ํ•˜๊ณ  ์ƒˆ๋กœ์šด ๊ธฐ๋Šฅ์˜ ์šฐ์„ ์ˆœ์œ„๋ฅผ ์ง€์ •ํ•˜๋Š”๋ฐ ๋„์›€์ด ๋ฉ๋‹ˆ๋‹ค.
ํ…”๋ ˆ๋ฉ”ํŠธ๋ฆฌ๋Š” HuggingFace ํ—ˆ๋ธŒ์—์„œ ๋ชจ๋ธ๊ณผ ํŒŒ์ดํ”„๋ผ์ธ์„ ๋ถˆ๋Ÿฌ์˜ฌ ๋•Œ๋งŒ ์ „์†ก๋˜๋ฉฐ, ๋กœ์ปฌ ์‚ฌ์šฉ ์ค‘์—๋Š” ์ˆ˜์ง‘๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
์šฐ๋ฆฌ๋Š” ์ถ”๊ฐ€ ์ •๋ณด๋ฅผ ๊ณต์œ ํ•˜์ง€ ์•Š๊ธฐ๋ฅผ ์›ํ•˜๋Š” ์‚ฌ๋žŒ์ด ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์ดํ•ดํ•˜๊ณ  ๊ฐœ์ธ ์ •๋ณด๋ฅผ ์กด์ค‘ํ•˜๋ฏ€๋กœ, ํ„ฐ๋ฏธ๋„์—์„œ `DISABLE_TELEMETRY` ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•˜์—ฌ ํ…”๋ ˆ๋ฉ”ํŠธ๋ฆฌ ์ˆ˜์ง‘์„ ๋น„ํ™œ์„ฑํ™”ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
Linux/MacOS์—์„œ:
```bash
export DISABLE_TELEMETRY=YES
```
Windows์—์„œ:
```bash
set DISABLE_TELEMETRY=YES
```

View File

@@ -0,0 +1,123 @@
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
-->
# ํ›‘์–ด๋ณด๊ธฐ
๐Ÿงจ Diffusers๋กœ ๋น ๋ฅด๊ฒŒ ์‹œ์ž‘ํ•˜๊ณ  ์‹คํ–‰ํ•˜์„ธ์š”!
์ด ํ›‘์–ด๋ณด๊ธฐ๋Š” ์—ฌ๋Ÿฌ๋ถ„์ด ๊ฐœ๋ฐœ์ž, ์ผ๋ฐ˜์‚ฌ์šฉ์ž ์ƒ๊ด€์—†์ด ์‹œ์ž‘ํ•˜๋Š” ๋ฐ ๋„์›€์„ ์ฃผ๋ฉฐ, ์ถ”๋ก ์„ ์œ„ํ•ด [`DiffusionPipeline`] ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.
์‹œ์ž‘ํ•˜๊ธฐ์— ์•ž์„œ์„œ, ํ•„์š”ํ•œ ๋ชจ๋“  ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์„ค์น˜๋˜์–ด ์žˆ๋Š”์ง€ ํ™•์ธํ•˜์„ธ์š”:
```bash
pip install --upgrade diffusers accelerate transformers
```
- [`accelerate`](https://huggingface.co/docs/accelerate/index)์€ ์ถ”๋ก  ๋ฐ ํ•™์Šต์„ ์œ„ํ•œ ๋ชจ๋ธ ๋ถˆ๋Ÿฌ์˜ค๊ธฐ ์†๋„๋ฅผ ๋†’์ž…๋‹ˆ๋‹ค.
- [`transformers`](https://huggingface.co/docs/transformers/index)๋Š” [Stable Diffusion](https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/overview)๊ณผ ๊ฐ™์ด ๊ฐ€์žฅ ๋„๋ฆฌ ์‚ฌ์šฉ๋˜๋Š” ํ™•์‚ฐ ๋ชจ๋ธ์„ ์‹คํ–‰ํ•˜๊ธฐ ์œ„ํ•ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
## DiffusionPipeline
[`DiffusionPipeline`]์€ ์ถ”๋ก ์„ ์œ„ํ•ด ์‚ฌ์ „ํ•™์Šต๋œ ํ™•์‚ฐ ์‹œ์Šคํ…œ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ€์žฅ ์‰ฌ์šด ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค. ๋‹ค์–‘ํ•œ ์–‘์‹์˜ ๋งŽ์€ ์ž‘์—…์— [`DiffusionPipeline`]์„ ๋ฐ”๋กœ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ง€์›๋˜๋Š” ์ž‘์—…์€ ์•„๋ž˜์˜ ํ‘œ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”:
| **Task** | **Description** | **Pipeline**
|------------------------------|--------------------------------------------------------------------------------------------------------------|-----------------|
| Unconditional Image Generation | ๊ฐ€์šฐ์‹œ์•ˆ ๋…ธ์ด์ฆˆ์—์„œ ์ด๋ฏธ์ง€ ์ƒ์„ฑ | [unconditional_image_generation](./using-diffusers/unconditional_image_generation`) |
| Text-Guided Image Generation | ํ…์ŠคํŠธ ํ”„๋กฌํ”„ํŠธ๋กœ ์ด๋ฏธ์ง€ ์ƒ์„ฑ | [conditional_image_generation](./using-diffusers/conditional_image_generation) |
| Text-Guided Image-to-Image Translation | ํ…์ŠคํŠธ ํ”„๋กฌํ”„ํŠธ์— ๋”ฐ๋ผ ์ด๋ฏธ์ง€ ์กฐ์ • | [img2img](./using-diffusers/img2img) |
| Text-Guided Image-Inpainting | ๋งˆ์Šคํฌ ๋ฐ ํ…์ŠคํŠธ ํ”„๋กฌํ”„ํŠธ๊ฐ€ ์ฃผ์–ด์ง„ ์ด๋ฏธ์ง€์˜ ๋งˆ์Šคํ‚น๋œ ๋ถ€๋ถ„์„ ์ฑ„์šฐ๊ธฐ | [inpaint](./using-diffusers/inpaint) |
| Text-Guided Depth-to-Image Translation | ๊นŠ์ด ์ถ”์ •์„ ํ†ตํ•ด ๊ตฌ์กฐ๋ฅผ ์œ ์ง€ํ•˜๋ฉด์„œ ํ…์ŠคํŠธ ํ”„๋กฌํ”„ํŠธ์— ๋”ฐ๋ผ ์ด๋ฏธ์ง€์˜ ์ผ๋ถ€๋ฅผ ์กฐ์ • | [depth2image](./using-diffusers/depth2image) |
ํ™•์‚ฐ ํŒŒ์ดํ”„๋ผ์ธ์ด ๋‹ค์–‘ํ•œ ์ž‘์—…์— ๋Œ€ํ•ด ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”์ง€๋Š” [**Using Diffusers**](./using-diffusers/overview)๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
์˜ˆ๋ฅผ๋“ค์–ด, [`DiffusionPipeline`] ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•˜์—ฌ ์‹œ์ž‘ํ•˜๊ณ , ๋‹ค์šด๋กœ๋“œํ•˜๋ ค๋Š” ํŒŒ์ดํ”„๋ผ์ธ ์ฒดํฌํฌ์ธํŠธ๋ฅผ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
๋ชจ๋“  [Diffusers' checkpoint](https://huggingface.co/models?library=diffusers&sort=downloads)์— ๋Œ€ํ•ด [`DiffusionPipeline`]์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
ํ•˜์ง€๋งŒ, ์ด ๊ฐ€์ด๋“œ์—์„œ๋Š” [Stable Diffusion](https://huggingface.co/CompVis/stable-diffusion)์„ ์‚ฌ์šฉํ•˜์—ฌ text-to-image๋ฅผ ํ•˜๋Š”๋ฐ [`DiffusionPipeline`]์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
[Stable Diffusion](https://huggingface.co/CompVis/stable-diffusion) ๊ธฐ๋ฐ˜ ๋ชจ๋ธ์„ ์‹คํ–‰ํ•˜๊ธฐ ์ „์— [license](https://huggingface.co/spaces/CompVis/stable-diffusion-license)๋ฅผ ์ฃผ์˜ ๊นŠ๊ฒŒ ์ฝ์œผ์„ธ์š”.
์ด๋Š” ๋ชจ๋ธ์˜ ํ–ฅ์ƒ๋œ ์ด๋ฏธ์ง€ ์ƒ์„ฑ ๊ธฐ๋Šฅ๊ณผ ์ด๊ฒƒ์œผ๋กœ ์ƒ์„ฑ๋  ์ˆ˜ ์žˆ๋Š” ์œ ํ•ดํ•œ ์ฝ˜ํ…์ธ  ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค. ์„ ํƒํ•œ Stable Diffusion ๋ชจ๋ธ(*์˜ˆ*: [`runwayml/stable-diffusion-v1-5`](https://huggingface.co/runwayml/stable-diffusion-v1-5))๋กœ ์ด๋™ํ•˜์—ฌ ๋ผ์ด์„ผ์Šค๋ฅผ ์ฝ์œผ์„ธ์š”.
๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ชจ๋ธ์„ ๋กœ๋“œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```python
>>> from diffusers import DiffusionPipeline
>>> pipeline = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
```
[`DiffusionPipeline`]์€ ๋ชจ๋“  ๋ชจ๋ธ๋ง, ํ† ํฐํ™” ๋ฐ ์Šค์ผ€์ค„๋ง ๊ตฌ์„ฑ์š”์†Œ๋ฅผ ๋‹ค์šด๋กœ๋“œํ•˜๊ณ  ์บ์‹œํ•ฉ๋‹ˆ๋‹ค.
๋ชจ๋ธ์€ ์•ฝ 14์–ต๊ฐœ์˜ ๋งค๊ฐœ๋ณ€์ˆ˜๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์œผ๋ฏ€๋กœ GPU์—์„œ ์‹คํ–‰ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
PyTorch์—์„œ์™€ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์ƒ์„ฑ๊ธฐ ๊ฐ์ฒด๋ฅผ GPU๋กœ ์˜ฎ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
```python
>>> pipeline.to("cuda")
```
์ด์ œ `pipeline`์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```python
>>> image = pipeline("An image of a squirrel in Picasso style").images[0]
```
์ถœ๋ ฅ์€ ๊ธฐ๋ณธ์ ์œผ๋กœ [PIL Image object](https://pillow.readthedocs.io/en/stable/reference/Image.html?highlight=image#the-image-class)๋กœ ๋ž˜ํ•‘๋ฉ๋‹ˆ๋‹ค.
๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ•จ์ˆ˜๋ฅผ ํ˜ธ์ถœํ•˜์—ฌ ์ด๋ฏธ์ง€๋ฅผ ์ €์žฅํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```python
>>> image.save("image_of_squirrel_painting.png")
```
**์ฐธ๊ณ **: ๋‹ค์Œ์„ ํ†ตํ•ด ๊ฐ€์ค‘์น˜๋ฅผ ๋‹ค์šด๋กœ๋“œํ•˜์—ฌ ๋กœ์ปฌ์—์„œ ํŒŒ์ดํ”„๋ผ์ธ์„ ์‚ฌ์šฉํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค:
```
git lfs install
git clone https://huggingface.co/runwayml/stable-diffusion-v1-5
```
๊ทธ๋ฆฌ๊ณ  ์ €์žฅ๋œ ๊ฐ€์ค‘์น˜๋ฅผ ํŒŒ์ดํ”„๋ผ์ธ์— ๋ถˆ๋Ÿฌ์˜ต๋‹ˆ๋‹ค.
```python
>>> pipeline = DiffusionPipeline.from_pretrained("./stable-diffusion-v1-5")
```
ํŒŒ์ดํ”„๋ผ์ธ ์‹คํ–‰์€ ๋™์ผํ•œ ๋ชจ๋ธ ์•„ํ‚คํ…์ฒ˜์ด๋ฏ€๋กœ ์œ„์˜ ์ฝ”๋“œ์™€ ๋™์ผํ•ฉ๋‹ˆ๋‹ค.
```python
>>> generator.to("cuda")
>>> image = generator("An image of a squirrel in Picasso style").images[0]
>>> image.save("image_of_squirrel_painting.png")
```
ํ™•์‚ฐ ์‹œ์Šคํ…œ์€ ๊ฐ๊ฐ ์žฅ์ ์ด ์žˆ๋Š” ์—ฌ๋Ÿฌ ๋‹ค๋ฅธ [schedulers](./api/schedulers/overview)์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ Stable Diffusion์€ `PNDMScheduler`๋กœ ์‹คํ–‰๋˜์ง€๋งŒ ๋‹ค๋ฅธ ์Šค์ผ€์ค„๋Ÿฌ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋งค์šฐ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. *์˜ˆ* [`EulerDiscreteScheduler`] ์Šค์ผ€์ค„๋Ÿฌ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋Š” ๊ฒฝ์šฐ, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```python
>>> from diffusers import EulerDiscreteScheduler
>>> pipeline = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
>>> # change scheduler to Euler
>>> pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)
```
์Šค์ผ€์ค„๋Ÿฌ ๋ณ€๊ฒฝ ๋ฐฉ๋ฒ•์— ๋Œ€ํ•œ ์ž์„ธํ•œ ๋‚ด์šฉ์€ [Using Schedulers](./using-diffusers/schedulers) ๊ฐ€์ด๋“œ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
[Stability AI's](https://stability.ai/)์˜ Stable Diffusion ๋ชจ๋ธ์€ ์ธ์ƒ์ ์ธ ์ด๋ฏธ์ง€ ์ƒ์„ฑ ๋ชจ๋ธ์ด๋ฉฐ ํ…์ŠคํŠธ์—์„œ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค ํ›จ์”ฌ ๋” ๋งŽ์€ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์šฐ๋ฆฌ๋Š” Stable Diffusion๋งŒ์„ ์œ„ํ•œ ์ „์ฒด ๋ฌธ์„œ ํŽ˜์ด์ง€๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค [link](./conceptual/stable_diffusion).
๋งŒ์•ฝ ๋” ์ ์€ ๋ฉ”๋ชจ๋ฆฌ, ๋” ๋†’์€ ์ถ”๋ก  ์†๋„, Mac๊ณผ ๊ฐ™์€ ํŠน์ • ํ•˜๋“œ์›จ์–ด ๋˜๋Š” ONNX ๋Ÿฐํƒ€์ž„์—์„œ ์‹คํ–‰๋˜๋„๋ก Stable Diffusion์„ ์ตœ์ ํ™”ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ๊ณ  ์‹ถ๋‹ค๋ฉด ์ตœ์ ํ™” ํŽ˜์ด์ง€๋ฅผ ์‚ดํŽด๋ณด์„ธ์š”:
- [Optimized PyTorch on GPU](./optimization/fp16)
- [Mac OS with PyTorch](./optimization/mps)
- [ONNX](./optimization/onnx)
- [OpenVINO](./optimization/open_vino)
ํ™•์‚ฐ ๋ชจ๋ธ์„ ๋ฏธ์„ธ์กฐ์ •ํ•˜๊ฑฐ๋‚˜ ํ•™์Šต์‹œํ‚ค๋ ค๋ฉด, [**training section**](./training/overview)์„ ์‚ดํŽด๋ณด์„ธ์š”.
๋งˆ์ง€๋ง‰์œผ๋กœ, ์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€๋ฅผ ๊ณต๊ฐœ์ ์œผ๋กœ ๋ฐฐํฌํ•  ๋•Œ ์‹ ์ค‘์„ ๊ธฐํ•ด ์ฃผ์„ธ์š” ๐Ÿค—.