Skip to content

Commit 9335d78

Browse files
committed
add train gpu
Signed-off-by: Can-Zhao <[email protected]>
1 parent 99c5ad7 commit 9335d78

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

generation/maisi/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ We retrained several state-of-the-art diffusion model-based methods using our da
3131

3232
</div>
3333

34-
## Inference Time Cost and GPU Memory Usage
34+
## Time Cost and GPU Memory Usage
3535

36+
### Inference Time Cost and GPU Memory Usage
3637
| `output_size` | `autoencoder_sliding_window_infer_size` | `autoencoder_tp_num_splits` | Peak Memory | DM Time | VAE Time |
3738
|---------------|:--------------------------------------:|:---------------------------:|:-----------:|:-------:|:--------:|
3839
| 256x256x128 | >=[64,64,32], not used | 2 | 14G | 57s | 1s |
@@ -57,6 +58,23 @@ To reduce GPU memory usage, we can either increasing `autoencoder_tp_num_splits`
5758
Increasing `autoencoder_tp_num_splits` has smaller impact on the generated image quality.
5859
Yet reducing `autoencoder_sliding_window_infer_size` may introduce stitching artifact and has larger impact on the generated image quality.
5960

61+
### Training GPU Memory Usage
62+
VAE is trained on patches and thus can be trained with 16G GPU if patch size is set to be small like [64,64,64].
63+
Users can adjust patch size to fit the GPU memory.
64+
For the released model, we first trained the autoencoder with 16G V100 with small patch size [64,64,64], then continued training with 32G V100 with patch size of [128,128,128].
65+
66+
DM and ControlNet training GPU memory usage depends on the input image size.
67+
| `image_size` | `latent_size` | Peak Memory |
68+
|--------------|:------------- |:-----------:|
69+
| 256x256x128 | 4x64x64x32 | 5G |
70+
| 256x256x256 | 4x64x64x64 | 8G |
71+
| 512x512x128 | 4x128x128x32 | 12G |
72+
| 512x512x256 | 4x128x128x64 | 21G |
73+
| 512x512x512 | 4x128x128x128 | 39G |
74+
| 512x512x768 | 4x128x128x192 | 58G |
75+
76+
77+
6078

6179

6280
## MAISI Model Workflow

0 commit comments

Comments
 (0)