stable-diffusion-webui折腾记录

环境准备

conda create -n stable-diffusion python=3.10.6
conda activate stable-diffusion
conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia

安装webui

  1. 克隆代码
    git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
    cd stable-diffusion-webui
  2. 安装依赖
    注意不要使用webui.sh直接安装,会失败

    pip install -r requirements_versions.txt -i https://pypi.doubanio.com/simple/
    conda install gdown==5.1.0
    conda install beautifulsoup4==4.12.3
  3. 下载checkpoint
    地址:
    https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
    下载后放到目录:./models/Stable-diffusion/

启动

python launch.py

如出现以下错误

OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

则需要手动下载openai/clip-vit-large-patch14

下载地址:https://huggingface.co/openai/clip-vit-large-patch14
file
可以将这边的所有文件下载下来,放到一个目录中,假设目录的绝对路径为/home/nyy/.cache/huggingface/hub/models--openai--clip-vit-large-patch14
然后需修改两个文件,如下

./repositories/generative-models/sgm/modules/encoders/modules.py
./repositories/stable-diffusion-stability-ai/ldm/modules/encoders/modules.py中还有两处

openai/clip-vit-large-patch14修改为上面下载的路径,这里为/home/nyy/.cache/huggingface/hub/models--openai--clip-vit-large-patch14
每个文件中有两处,总共修改四处
file
file

汉化

  1. 下载汉化包
    git clone https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN.git
  2. 将汉化包放入extensions目录
    file
  3. 重启webUI以确保扩展已经加载了
  4. Settings 选项卡,点击 页面右上角的 橙色 Reload UI 按钮 刷新扩展列表
    file
  5. Extensions选项卡,确定已勾选本扩展☑️;如未勾选,勾选后点击橙色按钮启用本扩展。
    file
  6. Settings 选项卡中,修改语言选项
    file
  7. 然后按一下 页面顶部左边的 橙色 Apply settings 按钮 保存设置,再按 右边的 橙色 Reload UI 按钮 重启webUI
    file

模型下载

civitai

暂无评论

发送评论 编辑评论

|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇