开源项目解析
IP-Adapter
用图片当提示词,锁住风格或人物。仅 22M 参数。
参考图直接参与生成不用训练
读懂层
2 张 · 架构图 / 流程图
DeepWiki 架构页 · 核验 2026-08-16
DeepWiki 架构页 · 抓取 2026-08-16 · 核验 2026-08-16
它管哪几个决定
角色跨镜头一致角色参考 · 多参考 · LoRA
7/10 家有官方说法画面构图线稿 / 姿势 / 深度约束
自持能力
权重在不在本地可下载到本地
种子能不能填不涉及
换掉它要动几处一处
适配器 22M,挂上去或摘下来都是一处
动手层
文档代码结构踩过的坑实测 未做
装它要过哪几关
- 1下 image encoderSD1.5 用 OpenCLIP-ViT-H-14,SDXL 那条线用 ViT-bigG-14 —— 拿错编码器会静默出垃圾
- 2下对应变体的 ip_ckpt`ip-adapter.bin`(1.5) / `ip-adapter-plus.bin`(细粒度) / `ip-adapter-plus-face.bin`(人脸) / `ip-adapter_sdxl.bin` / `ip-adapter-faceid.bin`
- 3从 ip_adapter 模块导入对应类变体与类要配对,Plus 用 Plus 的类
改哪个文件能改什么
scale 参数**只想要图不要文字提示时设 1.0;图文混合官方建议 0.5**。调低更多样但更不像参考图image_encoder_path换编码器。SDXL 变体是两阶段训练的,编码器不能随便换ip_ckpt换变体。锁风格与锁人脸是不同权重,不是同一个调参坑在哪一处
带 issue 编号的来自:github issues 按回复数排序 · 核验 2026-08-16
非方形输入CLIP 的图像处理器做中心裁剪,中心以外的信息直接丢。官方给的办法是先缩到 224×224
图文混合scale 不调的话文字提示基本被压住 —— 默认值是为纯图设计的
颜色偏移issue #187「Color Problem」开着 —— 参考图会把色调也带过去,这不是提示词能纠回来的
FaceID 与 SDXL仓库自标 FaceID 为实验性;#59「SDXL 的 FaceID 变体」是个还开着的请求 —— 想在 SDXL 上锁脸,这条路官方还没铺完
训练自己的适配器#4「Training Code」、#162「训练配置示例」长期开着 —— 训练文档是这个项目最薄的一块
教程
没找到官方口径的教程 —— 官方只给了 README。
项目自述
以下是仓库 README 的开头部分(原文引用,抓取 2026-08-17)。读全文 ↗
___*IP-Adapter: Text Compatible Image Prompt Adapter for Text-to-Image Diffusion Models*___ Introduction we present IP-Adapter, an effective and lightweight adapter to achieve image prompt capability for the pre-trained text-to-image diffusion models. An IP-Adapter with only 22M parameters can achieve comparable or even better performance to a fine-tuned image prompt model. IP-Adapter can be generalized not only to other custom models fine-tuned from the same base model, but also to controllable generation using existing controllable tools. Moreover, the image prompt can also work well with the text prompt to accomplish multimodal image generation. Release - [2024/01/19] 🔥 Add IP-Adapter-FaceID-Portrait, more information can be found here. - [2024/01/17] 🔥 Add an experimental version of IP-Adapter-FaceID-PlusV2 for SDXL, more information can be found here. - [2024/01/04] 🔥 Add an experimental version of IP-Adapter-FaceID for SDXL, more information can be found here. - [2023/12/29] 🔥 Add an experimental version of IP-Adapter-FaceID-PlusV2, more information can be found here. - [2023/12/27] 🔥 Add an experimental version of IP-Adapter-FaceID-Plus, more information can be found here. - [2023/12/20] 🔥 Add an experimental version of IP-Adapter-FaceID, more information can be found here. - [2023/11/22] IP-Adapter is available in Diffusers thanks to Diffusers Team. - [2023/11/10] 🔥 Add an updated version of IP-Adapter-Face. The demo is here. - [2023/11/05] 🔥 Add text-to-image demo with IP-Adapter and Kandinsky 2.2 Prior - [2023/11/02] Support safetensors - [2023/9/08] 🔥 Update a new version of IP-Adapter with SDXL_1.0. More information can be found here. - [2023/9/05] 🔥🔥🔥 IP-Adapter is supported in WebUI and ComfyUI (or ComfyUI_IPAdapter_plus). - [2023/8/30] 🔥 Add an IP-Adapter with face image as prompt. The demo is here. - [2023/8/29] 🔥 Release the training code. - [2023/8/23] 🔥 Add code and models of IP-Adapter with fine-grained features. The demo is here. - [2023/8/18] 🔥 Add code and models for SDXL 1.0. The demo is here. - [2023/8/16] 🔥 We release the code and models. Installation install latest diffusers pip install diffusers==0.22.1 install ip-adapter pip install git+https://github.com/tencent-ailab/IP-Adapter.git download the models cd IP-Adapter git lfs install git clone https://huggingface.co/h94/IP-Adapter mv IP-Adapter/models models mv IP-Adapter/sdxl_models sdxl_models then you can use the notebook Download Models you can download models from here. To run the demo, you should also download the following models: - runwayml/stable-diffusion-v1-5 - stabilityai/sd-vae-ft-mse - SG161222/Realistic_Vision_V4.0_noVAE - ControlNet models How to Use SD_1.5 - ip_adapter_demo: image variations, image-to-image, and inpainting with image prompt. - ip_adapter_controlnet_demo, ip_adapter_t2i-adapter: structural generation with image prompt. - ip_adapter_multimodal_prompts_demo: generation with multimodal prompts. - ip_adapter-plus_demo: the demo of IP-Adapter with fine-grained features. - ip_adapter-plus-face_demo: generation with face image as prompt. Best Practice - If you only use the image prompt, you can set the sc ……(后略,见原文)
判断
优势
- 22M 参数,比全量微调轻两个量级
- 不需要训练,给图即用
- 可与文本提示同时生效
局限
- 停更 26 个月(最后提交 2024-06-28)—— SDXL 的 FaceID 变体那个请求就此永远开着
- 非方形输入会丢失中心以外的信息,官方建议缩到 224×224
- 多模态提示效果不稳,通常要调 scale
不适用
需要精确控制多个不同人物时。
同管这些决定的其它项目
ComfyUI节点式工作流底座。图像 / 视频 / 音频 / 3D / 文本共用一个底座。…MiniMax H3全模态生成:文字、图片、视频、音频进同一个 Transformer,出带 32kHz…ControlNet给扩散模型加条件控制。九种结构信号:Canny 边缘、直线、HED 边界、涂鸦、人体…InstantID一张脸照做身份保持生成,零样本、免调优。…kohya sd-scripts训练脚本集:覆盖 SD1.x/2.x、SDXL、SD3/3.5、FLUX.1;202…musubi-tuner视频模型的 LoRA 训练器。同一套代码训 Wan 2.1/2.2、HunyuanV…DiffSynth-Studio魔搭扩散模型工程框架,覆盖图像、视频、音乐推理与训练;近期加入 FLUX.3、MOS…火宝短剧基于 AI 的一站式短剧生成平台,从剧本到成片全自动化。…ToonflowAI 创作平台:无限画布、AI Agent、可视化工作流,支持图像、视频、分镜和短剧…infinite-canvas面向 AI 创作的无限画布工作台:生图、参考图编辑、视频生成、Agent 助手、画布…open-ai-canvas面向 AI 影视创作的无限画布:多模态生成、分镜编排、素材管理、Agent 工作流。…VOZEB PRO把统一创作 Agent、画布、短剧生产线、素材库和商业运营后台放进同一套 Next.…OpenMontage让 Agent 编排视频生产:通过声明式流水线组织素材、生成、字幕、音频与合成。…Generative Media Skills给 Agent(Claude Code / Cursor / Gemini CLI)…motion-skills动效技能索引:55 个技能分成 18 个安装包,覆盖短视频、数据动画、网页动效、3D…ComfyUI-ManagerComfyUI 的节点管理器:装节点、装模型、修依赖、查注册表。ComfyUI 生态…ComfyUI-WanVideoWrapper把 Wan 系列模型接进 ComfyUI 的节点包。社区里跑 Wan 的事实标准封装…ComfyUI 官方工作流模板ComfyUI 内置的那批官方工作流模板与子图蓝图的真身仓库。…waoowaoo把一部小说灌进去,自动拆角色、拆场景、出分镜,再合成整集短剧。中英双界面。…JellyfishAI 短剧的端到端工作台:从剧本进,到分镜、角色一致性管理、出片、导出。…魔因漫创桌面端 AI 影视工具(Electron):剧本 → 角色 → 场景 → 导演 → …BigBanana AI Director一站式 AI 短剧 / 漫剧工作台,四阶段:剧本 → 视觉资产 → 分镜制作 → 导…ClipForge带货短视频专用的一站式工具:上传商品图,自动提炼卖点、写种草脚本、配音配字幕加背景乐…Open AI UGC生成 UGC 风格的口播广告:用多个视频模型出真人感的 AI 演员念你的脚本。定位是…LiveTalking实时交互流式数字人引擎,音视频同步对话。支持 ernerf、musetalk、wav…Drama Skills面向编剧与漫剧工作室的短剧创作流水线:十个技能把一个点子或一部长篇材料,一路做成分集…AI Shortfilm Prompts一个 Claude Code 技能:把任意一个想法变成电影语言的、模型直接能用的视频…Awesome Seedance 2 Prompts整理好的 Seedance 2.0 视频提示词库,README 自述逾六千条,覆盖电…歸藏的提示词库中文 AI 圈里流传最广的个人提示词仓库之一,存放作者为各家模型撰写的提示词。…MidJourney 风格与关键词参考一份带示例图的风格与关键词对照表:同一个提示词加不同风格词,画面变成什么样,逐个列出…AI Visual Prompt Cookbook171 套结构化提示词风格、342 张预览;JSON 模板支持 v2.1 / v2.…
github README + DeepWiki 架构页 · 核验 2026-10-19 | 判断栏可报错。