giulio98 commited on
Commit
080ab9b
1 Parent(s): 517ca84

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -0
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - eurecom-ds/celeba
4
+ library_name: diffusers
5
+ pipeline_tag: unconditional-image-generation
6
+ ---
7
+ ```python
8
+ # !pip install diffusers
9
+ from diffusers import DiffusionPipeline
10
+ import torch
11
+
12
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
13
+ model_id = "eurecom-ds/scoresdeve-ema-celeba-64"
14
+
15
+ # load model and scheduler
16
+ pipe = DiffusionPipeline.from_pretrained(model_id, trust_remote_code=True)
17
+ pipe.to(device)
18
+
19
+
20
+ # run pipeline in inference (sample random noise and denoise)
21
+ generator = torch.Generator(device=device).manual_seed(46)
22
+ image = pipe(
23
+ generator=generator,
24
+ batch_size=1,
25
+ num_inference_steps=1000
26
+ ).images
27
+
28
+
29
+ # save image
30
+ image[0].save("sde_ve_generated_image.png")
31
+ ```