Masrkai commited on
Commit
33baf83
1 Parent(s): ad6a2d9

Create Main.py

Browse files
Files changed (1) hide show
  1. Main.py +19 -0
Main.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from diffusers import ShapEPipeline
3
+ from diffusers.utils import export_to_gif
4
+
5
+
6
+ ckpt_id = "openai/shap-e"
7
+ pipe = ShapEPipeline.from_pretrained(repo).to("cuda")
8
+
9
+
10
+ guidance_scale = 15.0
11
+ prompt = "a shark"
12
+ images = pipe(
13
+ prompt,
14
+ guidance_scale=guidance_scale,
15
+ num_inference_steps=64,
16
+ size=256,
17
+ ).images
18
+
19
+ gif_path = export_to_gif(images, "shark_3d.gif")