Stable Diffusion模型加载停滞无法生成图像,请求技术排查
Stable Diffusion模型持续加载无法生成图像的解决方案
问题背景
- 已完成SD软件安装,将模型文件放入
models\Stable-diffusion目录 - 运行
webui-user.bat无报错,但界面上Stable Diffusion checkpoint一直显示加载中,无法生成图像 - 更换多个模型后问题依旧
界面与配置参考


启动日志
Version: v1.4.0 Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8 Installing requirements Launching Web UI with arguments: No module 'xformers'. Proceeding without it. Loading weights [6ce0161689] from D:\stable\sd.webui\webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors preload_extensions_git_metadata for 7 extensions took 0.00s Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. Startup time: 8.9s (import torch: 3.1s, import gradio: 1.7s, import ldm: 0.7s, other imports: 1.5s, setup codeformer: 0.1s, load scripts: 0.9s, create ui: 0.4s, gradio launch: 0.4s). Creating model from config: D:\stable\sd.webui\webui\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Applying attention optimization: Doggettx... done. Textual inversion embeddings loaded(0): Model loaded in 6.4s (load weights from disk: 0.9s, create model: 0.5s, apply weights to model: 1.1s, apply half(): 1.0s, move model to device: 2.2s, calculate empty prompt: 0.6s).
实用解决步骤
1. 强制刷新页面或更换浏览器
- 按
Ctrl+F5强制刷新SD网页,清除浏览器缓存,很多时候是前端界面没同步后端模型加载完成的状态 - 换个浏览器打开
http://127.0.0.1:7860,排除浏览器兼容性问题
2. 修改启动参数
- 打开
webui-user.bat,找到set COMMANDLINE_ARGS=这一行,添加以下参数:--no-half-vae:解决VAE半精度加载异常导致的界面卡住--lowvram:显存不足时启用,减轻显卡负载- 修改后示例:
set COMMANDLINE_ARGS=--no-half-vae --lowvram
- 保存后重新运行
webui-user.bat
3. 检查模型文件
- 重新下载模型,核对文件哈希值和官方一致,避免文件损坏
- 把模型文件名改成纯英文(比如
v1.5.safetensors),不要有空格、中文或特殊符号
4. 排查扩展冲突
- 在启动参数里加
--disable-extensions,禁用所有扩展后重启SD,如果恢复正常,再逐个开启扩展找问题 - 卸载或更新有问题的扩展
5. 验证显卡与PyTorch
- 更新显卡驱动到最新版本
- 打开CMD输入
python -c "import torch; print(torch.cuda.is_available())",返回True才说明CUDA正常工作,否则重新安装PyTorch
内容的提问来源于stack exchange,提问作者newbie
相关产品推荐
相关产品推荐

