# Multiclass Unconditional Image Generation

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmulticlass-unconditional-image-generation%2F43206%3E%5C
**Category:** 🧨 Diffusers\
**Created:** [June 14, 2023, 10:44am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmulticlass-unconditional-image-generation%2F43206 "2023-06-14T10:44:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvs-moudgalya](https://avatars.discourse-cdn.com/v4/letter/k/ecccb3/32.png) [@kvs-moudgalya](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fkvs-moudgalya)%5C
**Post date:** [June 14, 2023, 10:44am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fmulticlass-unconditional-image-generation%2F43206%2F1 "2023-06-14T10:44:30Z")

</div>

Hi folks,

I’m currently performing unconditional image generation.  
Input: My input is multiclass image data with 10 class of images (for example, cifar10).  
Output: Expected output is to generate images for each class.  
Problem: I’m able to generate images, but not able to extract/connect the class label into which the generated image belong to.  
For example, I want to generate specifically Frog images from trained model based on cifar10 model

I’m not able to find the solution even in Github repo as well.

I would highly appreciate if someone could guide me on how to extract the class label.

Thanks and regards

Here is the code snippet:

!pip install diffusers  
from diffusers import DDPMPipeline, DDIMPipeline, PNDMPipeline

model\_id = “google/ddpm-cifar10-32”

// load model and scheduler  
ddpm = DDPMPipeline.from\_pretrained(model\_id) # you can replace DDPMPipeline with DDIMPipeline or PNDMPipeline for faster inference

// run pipeline in inference (sample random noise and denoise)  
image = ddpm().images[0]

// save image  
image.save(“ddpm\_generated\_image.png”)
