Skip to content

Commit 8480983

Browse files
committed
diffusers example
1 parent 87599e5 commit 8480983

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/hub/dduf.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,23 @@ For more flexibility, use [`export_entries_as_dduf`] to explicitly specify a lis
130130
>>> export_entries_as_dduf(dduf_path="my-cool-diffusion-model.dduf", entries=as_entries(pipe))
131131
```
132132

133+
### Loading a pipeline with Diffusers
134+
135+
Diffusers has a built-in integration for DDUF files. Here is an example on how to load a pipeline from a stored checkpoint on the Hub:
136+
137+
```py
138+
from diffusers import DiffusionPipeline
139+
import torch
140+
141+
pipe = DiffusionPipeline.from_pretrained(
142+
"DDUF/FLUX.1-dev-DDUF", dduf_file="FLUX.1-dev.dduf", torch_dtype=torch.bfloat16
143+
).to("cuda")
144+
image = pipe(
145+
"photo a cat holding a sign that says Diffusers", num_inference_steps=50, guidance_scale=3.5
146+
).images[0]
147+
image.save("cat.png")
148+
```
149+
133150
## F.A.Q.
134151

135152
### Why build on top of ZIP?

0 commit comments

Comments
 (0)