Spaces:
Runtime error
Runtime error
File size: 1,936 Bytes
87d40d2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
<!--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.
-->
# xFormers μ€μΉνκΈ°
μΆλ‘ κ³Ό νμ΅ λͺ¨λμ [xFormers](https://github.com/facebookresearch/xformers)λ₯Ό μ¬μ©νλ κ²μ΄ μ’μ΅λλ€.
μ체 ν
μ€νΈλ‘ μ΄ν
μ
λΈλ‘μμ μνλ μ΅μ νκ° λ λΉ λ₯Έ μλμ μ μ λ©λͺ¨λ¦¬ μλΉλ₯Ό νμΈνμ΅λλ€.
2023λ
1μμ μΆμλ xFormers λ²μ '0.0.16'λΆν° μ¬μ λΉλλ pip wheelμ μ¬μ©νμ¬ μ½κ² μ€μΉν μ μμ΅λλ€:
```bash
pip install xformers
```
<Tip>
xFormers PIP ν¨ν€μ§μλ μ΅μ λ²μ μ PyTorch(xFormers 0.0.16μ 1.13.1)κ° νμν©λλ€. μ΄μ λ²μ μ PyTorchλ₯Ό μ¬μ©ν΄μΌ νλ κ²½μ° [νλ‘μ νΈ μ§μΉ¨](https://github.com/facebookresearch/xformers#installing-xformers)μ μμ€λ₯Ό μ¬μ©ν΄ xFormersλ₯Ό μ€μΉνλ κ²μ΄ μ’μ΅λλ€.
</Tip>
xFormersλ₯Ό μ€μΉνλ©΄, [μ¬κΈ°](fp16#memory-efficient-attention)μ μ€λͺ
ν κ²μ²λΌ 'enable_xformers_memory_efficient_attention()'μ μ¬μ©νμ¬ μΆλ‘ μλλ₯Ό λμ΄κ³ λ©λͺ¨λ¦¬ μλΉλ₯Ό μ€μΌ μ μμ΅λλ€.
<Tip warning={true}>
[μ΄ μ΄μ](https://github.com/huggingface/diffusers/issues/2234#issuecomment-1416931212)μ λ°λ₯΄λ©΄ xFormers `v0.0.16`μμ GPUλ₯Ό μ¬μ©ν νμ΅(νμΈ νλ λλ Dreambooth)μ ν μ μμ΅λλ€. ν΄λΉ λ¬Έμ κ° λ°κ²¬λλ©΄. ν΄λΉ μ½λ©νΈλ₯Ό μ°Έκ³ ν΄ development λ²μ μ μ€μΉνμΈμ.
</Tip>
|