giulio98 commited on
Commit
7bb9f50
·
verified ·
1 Parent(s): 8303189

Create README.md

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