Skip to content

Commit 27b9023

Browse files
authored
Update Custom Diffusion Documentation for Multiple Concept Inference to resolve issue huggingface#10791 (huggingface#10792)
Update Custom Diffusion Documentation for Multiple Concept Inference This PR updates the Custom Diffusion documentation to correctly demonstrate multiple concept inference by: - Initializing the pipeline from a proper foundation model (e.g., "CompVis/stable-diffusion-v1-4") instead of a fine-tuned model. - Defining model_id explicitly to avoid NameError. - Correcting method calls for loading attention processors and textual inversion embeddings.
1 parent 9a147b8 commit 27b9023

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/source/en/training/custom_diffusion.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ import torch
339339
from huggingface_hub.repocard import RepoCard
340340
from diffusers import DiffusionPipeline
341341

342-
pipeline = DiffusionPipeline.from_pretrained("sayakpaul/custom-diffusion-cat-wooden-pot", torch_dtype=torch.float16).to("cuda")
342+
pipeline = DiffusionPipeline.from_pretrained(
343+
"CompVis/stable-diffusion-v1-4", torch_dtype=torch.float16,
344+
).to("cuda")
345+
model_id = "sayakpaul/custom-diffusion-cat-wooden-pot"
343346
pipeline.unet.load_attn_procs(model_id, weight_name="pytorch_custom_diffusion_weights.bin")
344347
pipeline.load_textual_inversion(model_id, weight_name="<new1>.bin")
345348
pipeline.load_textual_inversion(model_id, weight_name="<new2>.bin")

0 commit comments

Comments
 (0)