eliphatfs commited on
Commit
df82676
1 Parent(s): 47b234c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -0
README.md CHANGED
@@ -1,3 +1,33 @@
1
  ---
2
  license: openrail
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: openrail
3
  ---
4
+
5
+ Recommended version of `diffusers` is `0.20.2` with `torch` `2`.
6
+
7
+ Usage Example:
8
+ ```python
9
+ import torch
10
+ import requests
11
+ from PIL import Image
12
+ from diffusers import DiffusionPipeline, EulerAncestralDiscreteScheduler, ControlNetModel
13
+
14
+ # Load the pipeline
15
+ pipeline = DiffusionPipeline.from_pretrained(
16
+ "sudo-ai/zero123plus-v1.1", custom_pipeline="sudo-ai/zero123plus-pipeline",
17
+ torch_dtype=torch.float16
18
+ )
19
+ pipeline.add_controlnet(ControlNetModel.from_pretrained(
20
+ "sudo-ai/controlnet-zp11-depth-v1", torch_dtype=torch.float16
21
+ ), conditioning_scale=0.75)
22
+ # Feel free to tune the scheduler
23
+ pipeline.scheduler = EulerAncestralDiscreteScheduler.from_config(
24
+ pipeline.scheduler.config, timestep_spacing='trailing'
25
+ )
26
+ pipeline.to('cuda:0')
27
+ # Run the pipeline
28
+ cond = Image.open(requests.get("https://d.skis.ltd/nrp/sample-data/0_cond.png", stream=True).raw)
29
+ depth = Image.open(requests.get("https://d.skis.ltd/nrp/sample-data/0_depth.png", stream=True).raw)
30
+ result = pipeline(cond, depth_image=depth).images[0]
31
+ result.show()
32
+ result.save("output.png")
33
+ ```