快速结论:该问题发生在 Diffusers 管线中只对部分组件(如 text_encoder)调用 unfuse_lora(components=[...]) 时,导致 _merged_adapters/num_fused_loras 与实际 PEFT 合并状态脱节:unfuse_lora(components=[...]) desyncs _merged_adapters/num_fused_loras from actual per-component PEFT merge state。优先排查是否使用了只解除部分组件 LoRA 融合的写法,并升级到包含 PR #14385 修复的 Diffusers 版本。
适用环境:Diffusers(src/diffusers/loaders/lora_base.py main 分支源码)、PEFT 0.19.1、PyTorch 2.x、Python 3.12.10、Windows 11。该问题无需 GPU 即可复现,属于纯 Python set 记账逻辑错误。
最快修复
参考来源
AI 工具推荐
想把多个 AI 模型放在一个入口?
GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。
推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。
这个方案解决了吗?
可以继续搜索完整报错,或查看同一工具的其他排查指南。
![[Question]: error when attaching file in chat ----AttributeError("'Request' object has no attribute 'file'")](https://www.chat-gpts.plus/wp-content/uploads/2026/08/11805-40332ec3-768x403.jpg)
![[Question]: No keyword or question was found in dataSet afer files loaded by customized ingestion pipeline](https://www.chat-gpts.plus/wp-content/uploads/2026/08/11474-a36958b1-768x403.jpg)
