CODE for: Exploiting the Kurtosis Concentration Property for Image quality improvement

Instructions for Running code

1. Initialize diffusers environment and import packages. Standard diffusers library should work.

# Create a new environment with Python 3.8
conda create -n diffusers_env python=3.8

# Activate the environment
conda activate diffusers_env

# Install diffusers and transformers
conda install -c conda-forge diffusers
conda install -c conda-forge transformers

# Install PyTorch with CUDA support (if you have a compatible GPU)
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

# If you don't need CUDA support, use this instead
# conda install pytorch torchvision torchaudio cpuonly -c pytorch

# Install other useful packages
conda install numpy matplotlib scipy


2. Provide dataset and paths similar to per_subject_dreambooth

3. Run command to generate images with KC loss : python per_subject_dreambooth.py --subject_name dog --class_name dog --use_natural_loss True

4. Run command to generate images without KC loss : python per_subject_dreambooth.py --subject_name dog --class_name dog --use_natural_loss False
