Chen011 commited on
Commit
308841e
·
verified ·
1 Parent(s): f0a6d71

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - pytorch
5
+ - diffusers
6
+ - unconditional-image-generation
7
+ - diffusion-models-class
8
+ ---
9
+
10
+ # Model Card for Unit 1 of the [Diffusion Models Class 🧨](https://github.com/huggingface/diffusion-models-class)
11
+
12
+ This model is a diffusion model for unconditional image generation of cute 🦋.
13
+
14
+ ## Usage
15
+
16
+ ```python
17
+ from diffusers import DDPMPipeline
18
+ import torch
19
+
20
+ pipeline = DDPMPipeline.from_pretrained('Chen011/sd-class-butterflies-32').to("cuda" if torch.cuda.is_available() else "cpu")
21
+
22
+ # Generate random noise
23
+ random_noise = torch.randn((1, 3, 64, 64)) # Adjust the shape as per your model's requirements
24
+
25
+ # Pass through the pipeline
26
+ image = pipeline(num_inference_steps=50, generator=torch.manual_seed(42), latents=random_noise).images[0]
27
+ image.show()