安装stable-diffusion

安装流程:

  1. 下载stable-diffusion源码

    
    
  2. 安装python

    
    
  3. 添加host

    1. 打开C:\Windows\System32\drivers\etc\host

    2. 添加

      199.232.69.194 github.global-ssl.fastly.net
      140.82.112.3 github.com
      
  4. 修改launch.py

    将所有
    
    替换成
    
    
  5. 运行stable-diffusion-webui-1.2.1目录下webui-user.bat

    安装时长较长,耐心等待

  6. 安装成功日志,主要是出现了地址“http://127.0.0.1:7860”

    venv "G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\venv\\Scripts\\Python.exe"
    Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
    Version: 
    Commit hash: 
    Cloning Stable Diffusion into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\stable-diffusion-stability-ai...
    Cloning Taming Transformers into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\taming-transformers...
    Cloning K-diffusion into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\k-diffusion...
    Cloning CodeFormer into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\CodeFormer...
    Cloning BLIP into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\BLIP...
    Installing requirements for CodeFormer
    Installing requirements
    Launching Web UI with arguments:
    No module 'xformers'. Proceeding without it.
    Downloading: "" to G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\models\\Stable-diffusion\\v1-5-pruned-emaonly.safetensors
    
    100%|█████████████████████████████████████████████████████████████████████████████| 3.97G/3.97G [15:04<00:00, 4.72MB/s]
    Calculating sha256 for G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\models\\Stable-diffusion\\v1-5-pruned-emaonly.safetensors: Running on local URL:  
    
    To create a public link, set `share=True` in `launch()`.
    Startup time: 922.7s (import torch: 1.5s, import gradio: 1.5s, import ldm: 0.5s, other imports: 1.1s, list SD models: 916.2s, load scripts: 1.3s, create ui: 0.4s).
    6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa
    Loading weights [6ce0161689] from G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\models\\Stable-diffusion\\v1-5-pruned-emaonly.safetensors
    Creating model from config: G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\configs\\v1-inference.yaml
    LatentDiffusion: Running in eps-prediction mode
    DiffusionWrapper has 859.52 M params.
    Downloading (…)olve/main/vocab.json: 100%|███████████████████████████████████████████| 961k/961k [00:02<00:00, 428kB/s]
    Downloading (…)olve/main/merges.txt: 100%|███████████████████████████████████████████| 525k/525k [00:00<00:00, 788kB/s]
    Downloading (…)cial_tokens_map.json: 100%|████████████████████████████████████████████████████| 389/389 [00:00
  7. 打开chrome,输入http://127.0.0.1:7860

    1. 安装stable-diffusion_第1张图片

注意事项

  1. python版本要为3.10.6版本,不然会出现奇怪报错
  2. 主要解决的问题就是github下载一些开源工程会超时,只要按照教程修改host和lanch.py就能解决

你可能感兴趣的:(AI绘图,stable,diffusion)