A web application for generating novel, synthetic snowflake images using a custom unconditional DDPM U-Net model. It can generate images from a random latent space or in image-to-image mode, producing snowflakes based on an encoded and noised input image.
Snowflakeizer uses a custom, unconditional DDPM U-Net (EMA) trained from scratch on a dataset of snowflake photos: "Macro photos of real snowflakes" by Alexey Kljatov (CC BY).
The model was trained using the train.py script included in this repository.
The final model is hosted on Hugging Face and is downloaded automatically by the application during runtime. For more details, visit the model page: dledwon/latent-ddpm-unet-ema-snowflakes.
- Generate unique snowflake images from random latents.
- Image2Image mode: modify existing images to produce snowflake variations.
- Web interface built with Flask for easy interaction.
- Set a constant seed and modify parameters for controlling the output image.
- Python 3.10
- Flask
- PyTorch + CUDA
- 🤗 Diffusers
- HTML / CSS / JavaScript for the frontend
Follow these steps to set up Snowflakeizer locally:
# Clone the repository
git clone https://github.com/dledwon/Snowflakeizer.git
cd Snowflakeizer
# Create and activate a virtual environment (venv, conda, etc.)
# Install dependencies
pip install -r requirements.txt
# Install PyTorch with proper CUDA
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu{version}
# Run the Flask application
python app.py- Open your browser and navigate to http://localhost:5000.
- Choose your mode: Random Snowflake or Image2Snowflake.
- Upload an image for Image2Snowflake mode.
- Toggle between Random and Fixed seed, set a constant seed number.
- Adjust generation parameters: number of steps and strength.
- Click Generate and view/download the resulting image.






