赞
踩
huggingface的缓存目录 ~/.cach
- cd ~/.cache
- # pwd 后展示 /home/fxbox/.cache
- pwd
-
-
- pipe: StableDiffusionPipeline = StableDiffusionPipeline.from_pretrained(
- model_id_or_path,
- ).to(device=self.device, dtype=self.dtype)
改为:
- if os.path.exists(model_id_or_path):
- pipe: StableDiffusionPipeline = StableDiffusionPipeline.from_single_file(
- model_id_or_path
- ).to(device=self.device, dtype=self.dtype)
- else:
- pipe: StableDiffusionPipeline = StableDiffusionPipeline.from_pretrained(
- model_id_or_path,
- ).to(device=self.device, dtype=self.dtype)
https://www.cnblogs.com/FrostyForest/p/17841926.html
python diffusers StableDiffusionXLPipeline 离线使用_runwayml/stable-diffusion-v1-5 离线下载-CSDN博客
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。