Downloads · 30 days
2
1% of all-time downloads
gnokit/ddpm-butterflies-64
ddpm-butterflies-64 is a machine learning model from gnokit. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for diffusers. The card lists the license as apache-2.0.
Downloads · 30 days
2
1% of all-time downloads
All-time downloads
383
Public
Repo size
253 MB
Likes
0
Public
Click a slice to open those files.
.safetensors253 MB · 100%
From the Hugging Face model README

The model is intended for generating synthetic butterfly images for various purposes, including artistic design, data augmentation, and educational applications. It is not designed for generating real or identifiable butterfly species, and the generated images should not be considered as accurate representations of specific butterfly species.
The model architecture is a simple UNet architecture, which consists of an encoder and a decoder network.
from diffusers import UNet2DModel
unet = UNet2DModel(
in_channels=3,
sample_size=64,
block_out_channels=(64,128,256,512),
down_block_types=(
"DownBlock2D",
"DownBlock2D",
"AttnDownBlock2D",
"AttnDownBlock2D"
),
up_block_types=(
"AttnUpBlock2D",
"AttnUpBlock2D",
"UpBlock2D",
"UpBlock2D",
)
)
The encoder network captures the high-level features and abstract representations of the input noise. The decoder network uses the encoded features to generate the final butterfly image with a resolution of 64x64 pixels. The training process follow the tutorial guide of HuggingFace
The model was trained using a subset of the Smithsonian Butterfly Dataset 🤗 available on the Hugging Face model hub. The dataset contains a collection of butterfly images curated by the Smithsonian Institution. The training data was preprocessed to ensure consistent resolution and remove any identifying information or copyrighted images. The total size of the training dataset was approximately X images.
Example Python code snippets and instructions for using the model to generate butterfly images.
from diffusers import DDPMPipeline
pipeline = DDPMPipeline.from_pretrained("gnokit/ddpm-butterflies-64", use_safetensors=True, variant="fp16").to("cuda")
images = pipeline(batch_size=4).images
for idx, img in enumerate(images):
img.save(f"bf-{idx}.png")