From 5414b92d2b6363b85432d0c9e02f9d1a0767ebce Mon Sep 17 00:00:00 2001 From: Can-Zhao Date: Thu, 21 Nov 2024 19:42:49 +0000 Subject: [PATCH] adjust infer parameters Signed-off-by: Can-Zhao --- generation/maisi/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generation/maisi/README.md b/generation/maisi/README.md index 8788c0e99..1d6e02c36 100644 --- a/generation/maisi/README.md +++ b/generation/maisi/README.md @@ -133,10 +133,10 @@ The information for the inference input, like body region and anatomy to generat - `"controllable_anatomy_size"`: a list of controllable anatomy and its size scale (0--1). E.g., if set to `[["liver", 0.5],["hepatic tumor", 0.3]]`, the generated image will contain liver that have a median size, with size around 50% percentile, and hepatic tumor that is relatively small, with around 30% percentile. The output will contain paired image and segmentation mask for the controllable anatomy. - `"body_region"`: If "controllable_anatomy_size" is not specified, "body_region" will be used to constrain the region of generated images. It needs to be chosen from "head", "chest", "thorax", "abdomen", "pelvis", "lower". - `"anatomy_list"`: If "controllable_anatomy_size" is not specified, the output will contain paired image and segmentation mask for the anatomy in "./configs/label_dict.json". -- `"autoencoder_sliding_window_infer_size"`: in order to save GPU memory, we use sliding window inference when decoding latents to image when `"output_size"` is large. This is the patch size of the sliding window. Small value will reduce GPU memory but increase time cost. They need to be divisible by 16. +- `"autoencoder_sliding_window_infer_size"`: in order to save GPU memory, we use sliding window inference when decoding latents to image when `"output_size"` is large. This is the patch size of the sliding window. Small value will reduce GPU memory but increase time cost. They need to be divisible by 16. If GPU memory is large enough, please choose larger value of this parameter. - `"autoencoder_sliding_window_infer_overlap"`: float between 0 and 1. Large value will reduce the stitching artifacts when stitching patches during sliding window inference, but increase time cost. If you do not observe seam lines in the generated image result, you can use a smaller value to save inference time. +- `"autoencoder_tp_num_splits"`: int, chosen from [1,2,4,8,16]. In order to save GPU memory, we use tensor parallell in the autoencoder. Large value will reduce GPU memory. If GPU memory is large enough, please choose smaller value of this parameter. -To generate images with substantial dimensions, such as 512 × 512 × 512 or larger, using GPUs with 80GB of memory, it is advisable to configure the `"num_splits"` parameter in [the auto-encoder configuration](./configs/config_maisi.json#L11-L37) to 16. This adjustment is crucial to avoid out-of-memory issues during inference. #### Recommended spacing for different output sizes: