takuoko commited on
Commit
1cfea74
1 Parent(s): 54251d0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -11,6 +11,27 @@ The training is based on [DiffEngine](https://github.com/okotaku/diffengine), th
11
 
12
  I used [diffusers/dog-example](https://huggingface.co/datasets/diffusers/dog-example).
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  # Example result
15
 
16
  prompt = 'A photo of sks dog in a bucket'
 
11
 
12
  I used [diffusers/dog-example](https://huggingface.co/datasets/diffusers/dog-example).
13
 
14
+ # Inference
15
+
16
+ ```
17
+ import torch
18
+ from diffusers import DiffusionPipeline
19
+
20
+ checkpoint = 'takuoko/small-sd-dreambooth-lora-dog'
21
+ prompt = 'A photo of sks dog in a bucket'
22
+
23
+ pipe = DiffusionPipeline.from_pretrained(
24
+ 'segmind/small-sd', torch_dtype=torch.float16)
25
+ pipe.to('cuda')
26
+ pipe.load_lora_weights(checkpoint)
27
+
28
+ image = pipe(
29
+ prompt,
30
+ num_inference_steps=50,
31
+ ).images[0]
32
+ image.save('demo.png')
33
+ ```
34
+
35
  # Example result
36
 
37
  prompt = 'A photo of sks dog in a bucket'