mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
17 lines
1.7 KiB
Markdown
17 lines
1.7 KiB
Markdown
<!--Copyright 2024 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.
|
|
-->
|
|
|
|
# ๊ฐ์
|
|
|
|
๋
ธ์ด์ฆ๊ฐ ๋ง์ ์ถ๋ ฅ์์ ์ ์ ์ถ๋ ฅ์ผ๋ก ๋ง๋๋ ๊ณผ์ ์ผ๋ก ๊ณ ํ์ง ์์ฑ ๋ชจ๋ธ์ ์ถ๋ ฅ์ ๋ง๋๋ ๊ฐ๊ฐ์ ๋ฐ๋ณต๋๋ ์คํ
์ ๋ง์ ๊ณ์ฐ์ด ํ์ํฉ๋๋ค. ๐งจ Diffuser์ ๋ชฉํ ์ค ํ๋๋ ๋ชจ๋ ์ฌ๋์ด ์ด ๊ธฐ์ ์ ๋๋ฆฌ ์ด์ฉํ ์ ์๋๋ก ํ๋ ๊ฒ์ด๋ฉฐ, ์ฌ๊ธฐ์๋ ์๋น์ ๋ฐ ํน์ ํ๋์จ์ด์์ ๋น ๋ฅธ ์ถ๋ก ์ ๊ฐ๋ฅํ๊ฒ ํ๋ ๊ฒ์ ํฌํจํฉ๋๋ค.
|
|
|
|
์ด ์น์
์์๋ ์ถ๋ก ์๋๋ฅผ ์ต์ ํํ๊ณ ๋ฉ๋ชจ๋ฆฌ ์๋น๋ฅผ ์ค์ด๊ธฐ ์ํ ๋ฐ์ ๋ฐ(half-precision) ๊ฐ์ค์น ๋ฐ sliced attention๊ณผ ๊ฐ์ ํ๊ณผ ์๋ น์ ๋ค๋ฃน๋๋ค. ๋ํ [`torch.compile`](https://pytorch.org/tutorials/intermediate/torch_compile_tutorial.html) ๋๋ [ONNX Runtime](https://onnxruntime.ai/docs/)์ ์ฌ์ฉํ์ฌ PyTorch ์ฝ๋์ ์๋๋ฅผ ๋์ด๊ณ , [xFormers](https://facebookresearch.github.io/xformers/)๋ฅผ ์ฌ์ฉํ์ฌ memory-efficient attention์ ํ์ฑํํ๋ ๋ฐฉ๋ฒ์ ๋ฐฐ์ธ ์ ์์ต๋๋ค. Apple Silicon, Intel ๋๋ Habana ํ๋ก์ธ์์ ๊ฐ์ ํน์ ํ๋์จ์ด์์ ์ถ๋ก ์ ์คํํ๊ธฐ ์ํ ๊ฐ์ด๋๋ ์์ต๋๋ค. |