Skip to content

Commit 815d882

Browse files
authored
Add loading text inversion (#9130)
1 parent ba4348d commit 815d882

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/textual_inversion/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ import torch
109109
model_id = "path-to-your-trained-model"
110110
pipe = StableDiffusionPipeline.from_pretrained(model_id,torch_dtype=torch.float16).to("cuda")
111111

112+
repo_id_embeds = "path-to-your-learned-embeds"
113+
pipe.load_textual_inversion(repo_id_embeds)
114+
112115
prompt = "A <cat-toy> backpack"
113116

114117
image = pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]

0 commit comments

Comments
 (0)