Skip to content

Commit 23b9656

Browse files
committed
initial
1 parent 68d71d4 commit 23b9656

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

docs/source/en/optimization/memory.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,25 @@ specific language governing permissions and limitations under the License.
1212

1313
# Reduce memory usage
1414

15-
## Sharded checkpoints
15+
Modern diffusion models like [Flux](../api/pipelines/flux) and [Wan](../api/pipelines/wan) have billions of parameters that take up a lot of memory on your hardware for inference. This poses a challenge because common GPUs often don't have sufficient memory.
1616

17-
## Device placement
17+
To overcome these memory constraints, you can use a second GPU (if available), offload some of the pipeline components to the CPU, and more. This guide will show you how to reduce your memory usage.
1818

19-
## Sliced VAE
19+
## Multiple GPUs
20+
21+
If you have access to more than one GPU, there a few options for efficiently loading and distributing a large model across your hardware. These features are supported by the [Accelerate](https://huggingface.co/docs/accelerate/index) library, so make sure it is installed first.
22+
23+
```bash
24+
pip install -U accelerate
25+
```
26+
27+
### Sharded checkpoints
28+
29+
30+
31+
### Device placement
32+
33+
### Sliced VAE
2034

2135
## Tiled VAE
2236

@@ -32,4 +46,4 @@ specific language governing permissions and limitations under the License.
3246

3347
## Tracing
3448

35-
## Memory efficient attention
49+
## Memory efficient attention

0 commit comments

Comments
 (0)