LEAF: Latent Diffusion with Efficient Encoder Distillation for Aligned Features in Medical Image Segmentation Performance Setup Clone the repository: git clone https://github.com/lispear/LEAF.git cd LEAF-master Install dependencies (requires conda): conda create -n leaf python=3.11.11 -y conda activate leaf pip install -r requirements.txt Training Create assets directory: mkdir assets cd assets Prepare pre-trained models: Download U-Net and VAE Place the downloaded files in the assets folder. Extract the weights: unzip kl-f8.zip -d vae unzip lsun_churches.zip -d unet cd .. python extract_weights.py Generate training configuration: python src/util/config_util.py --output config.yaml Run training script: accelerate launch \ --num_processes 1 \ --num_machines 1 \ --mixed_precision 'no' \ --dynamo_backend 'no' \ train.py --config config.yaml