File size: 526 Bytes
33baf83
 
 
 
e26f3fa
408034b
0962f46
33baf83
 
e26f3fa
33baf83
 
 
5d2ecc5
33baf83
 
 
e26f3fa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import torch
from diffusers import ShapEPipeline
from diffusers.utils import export_to_gif

ckpt_id = "openai/shap-e"
device = torch.device("cpu")
pipe = ShapEPipeline.from_pretrained(ckpt_id, use_auth_token=True).to(device)

guidance_scale = 15.0
prompt = "A gentle Ai voice assistant constructed from a circle ring and 3 lines that fly alongside the circle"
images = pipe(
    prompt,
    guidance_scale=guidance_scale,
    num_inference_steps=16,
    size=256,
).images

gif_path = export_to_gif(images, "assistant_3d.gif")