ImportError: This example requires a source install from HuggingFace diffusers (see `https://huggingface.co/docs/diffusers/installation#install-from-source`), but the version found is 0.35.2.

从源代码安装

在从源代码安装 diffusers 之前,确保你已经安装了 torch 和 accelerate

torch的安装教程可以看 torch 文档.

安装 accelerate

pip install accelerate

从源码安装 🤗 Diffusers 需要使用以下命令:

pip install git+https://github.com/huggingface/diffusers

这个命令安装的是最新的 main版本,而不是最近的stable版。 main是一直和最新进展保持一致的。比如,上次发布的正式版中有bug,在main中可以看到这个bug被修复了,但是新的正式版此时尚未推出。 但是这也意味着 main版本不保证是稳定的。

 

posted on 2025-10-23 14:31  RoyNJU  阅读(3)  评论(0)    收藏  举报

导航