Skip to content

Commit

Permalink
Change in ip-adapter docs. CLIPVisionModelWithProjection should be im… (
Browse files Browse the repository at this point in the history
huggingface#6597)

Change in ip-adapter docs. CLIPVisionModelWithProjection should be imported from transformers, not diffusers
  • Loading branch information
juancopi81 authored Jan 16, 2024
1 parent 8842bca commit dff35a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/en/using-diffusers/loading_adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="models", weight_name="ip-a
IP-Adapter relies on an image encoder to generate the image features, if your IP-Adapter weights folder contains a "image_encoder" subfolder, the image encoder will be automatically loaded and registered to the pipeline. Otherwise you can so load a [`~transformers.CLIPVisionModelWithProjection`] model and pass it to a Stable Diffusion pipeline when you create it.

```py
from diffusers import AutoPipelineForText2Image, CLIPVisionModelWithProjection
from diffusers import AutoPipelineForText2Image
from transformers import CLIPVisionModelWithProjection
import torch

image_encoder = CLIPVisionModelWithProjection.from_pretrained(
Expand Down

0 comments on commit dff35a8

Please sign in to comment.