Views
No views yet
diffusers is 0.20.2 with torch 2.1import torch
2import requests
3from PIL import Image
4from diffusers import DiffusionPipeline, EulerAncestralDiscreteScheduler
5
6# Load the pipeline
7pipeline = DiffusionPipeline.from_pretrained(
8 "sudo-ai/zero123plus-v1.1", custom_pipeline="sudo-ai/zero123plus-pipeline",
9 torch_dtype=torch.float16
10)
11# Feel free to tune the scheduler
12pipeline.scheduler = EulerAncestralDiscreteScheduler.from_config(
13 pipeline.scheduler.config, timestep_spacing='trailing'
14)
15pipeline.to('cuda:0')
16# Run the pipeline
17cond = Image.open(requests.get("https://d.skis.ltd/nrp/sample-data/lysol.png", stream=True).raw)
18result = pipeline(cond).images[0]
19result.show()
20result.save("output.png")