• 安装stable-diffusion


    安装流程:

    1. 下载stable-diffusion源码

      <https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.2.1>
      
    2. 安装python

      <https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe>
      
    3. 添加host

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

      2. 添加

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

      1. 将所有
      2. <https://github.com>
      3. 替换成
      4. <https://ghproxy.com/https://github.com>
    5. 运行stable-diffusion-webui-1.2.1目录下webui-user.bat

      安装时长较长,耐心等待

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

      1. venv "G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\venv\\Scripts\\Python.exe"
      2. Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
      3. Version: <none>
      4. Commit hash: <none>
      5. Cloning Stable Diffusion into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\stable-diffusion-stability-ai...
      6. Cloning Taming Transformers into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\taming-transformers...
      7. Cloning K-diffusion into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\k-diffusion...
      8. Cloning CodeFormer into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\CodeFormer...
      9. Cloning BLIP into G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\repositories\\BLIP...
      10. Installing requirements for CodeFormer
      11. Installing requirements
      12. Launching Web UI with arguments:
      13. No module 'xformers'. Proceeding without it.
      14. Downloading: "" to G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\models\\Stable-diffusion\\v1-5-pruned-emaonly.safetensors
      15. 100%|█████████████████████████████████████████████████████████████████████████████| 3.97G/3.97G [15:04<00:00, 4.72MB/s]
      16. 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: <http://127.0.0.1:7860>
      17. To create a public link, set `share=True` in `launch()`.
      18. 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).
      19. 6ce0161689b3853acaa03779ec93eafe75a02f4ced659bee03f50797806fa2fa
      20. Loading weights [6ce0161689] from G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\models\\Stable-diffusion\\v1-5-pruned-emaonly.safetensors
      21. Creating model from config: G:\\funny\\stable_diffusion\\tmp\\stable-diffusion-webui-1.2.1\\configs\\v1-inference.yaml
      22. LatentDiffusion: Running in eps-prediction mode
      23. DiffusionWrapper has 859.52 M params.
      24. Downloading (…)olve/main/vocab.json: 100%|███████████████████████████████████████████| 961k/961k [00:02<00:00, 428kB/s]
      25. Downloading (…)olve/main/merges.txt: 100%|███████████████████████████████████████████| 525k/525k [00:00<00:00, 788kB/s]
      26. Downloading (…)cial_tokens_map.json: 100%|████████████████████████████████████████████████████| 389/389 [00:00<?, ?B/s]
      27. Downloading (…)okenizer_config.json: 100%|████████████████████████████████████████████████████| 905/905 [00:00<?, ?B/s]
      28. Downloading (…)lve/main/config.json: 100%|████████████████████████████████████████████████| 4.52k/4.52k [00:00<?, ?B/s]
      29. Applying cross attention optimization (Doggettx).
      30. Textual inversion embeddings loaded(0):
      31. Model loaded in 17.2s (calculate hash: 3.5s, load weights from disk: 0.2s, create model: 9.0s, apply weights to model: 1.5s, apply half(): 1.0s, move model to device: 0.5s, load textual inversion embeddings: 1.3s).
    7. 打开chrome,输入http://127.0.0.1:7860

    注意事项

    1. python版本要为3.10.6版本,不然会出现奇怪报错
    2. 主要解决的问题就是github下载一些开源工程会超时,只要按照教程修改host和lanch.py就能解决
  • 相关阅读:
    sql引用
    BIGEMAP中添加第三方卫星影像
    机器学习-搜索技术:从技术发展到应用实战的全面指南
    怎么用电脑制作证件照?使用这个工具就可以了
    SCXI-1104C NI 利用人工智能和机器学习进行网络防御
    【RPC】gRPC 安装及使用
    每天一个设计模式之观察者模式+发布订阅模式(Observer Pattern)
    SpringBoot源码解析-事件驱动注解@EventListener
    电脑键盘功能基础知识汇总
    Win10文件资源管理器卡顿不流畅的解决方法
  • 原文地址:https://blog.csdn.net/u011598479/article/details/130904443