安装stable-diffusion

news/2024/7/10 19:49:30 标签: 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. 添加

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

    将所有
    <https://github.com>
    替换成
    <https://ghproxy.com/https://github.com>
    
  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: <none>
    Commit hash: <none>
    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: "<https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors>" 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:  <http://127.0.0.1:7860>
    
    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<?, ?B/s]
    Downloading (…)okenizer_config.json: 100%|████████████████████████████████████████████████████| 905/905 [00:00<?, ?B/s]
    Downloading (…)lve/main/config.json: 100%|████████████████████████████████████████████████| 4.52k/4.52k [00:00<?, ?B/s]
    Applying cross attention optimization (Doggettx).
    Textual inversion embeddings loaded(0):
    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就能解决

http://www.niftyadmin.cn/n/366476.html

相关文章

leetcode 11.盛最多水的容器

题目描述 跳转到leetocde题目 给定一个长度为 n 的整数数组 height 。有 n 条垂线&#xff0c;第 i 条线的两个端点是 (i, 0) 和 (i, height[i]) 。 找出其中的两条线&#xff0c;使得它们与 x 轴共同构成的容器可以容纳最多的水。 返回容器可以储存的最大水量。 说明&#xff…

【Vue】学习笔记-Vue中的Ajax配置代理

回顾 常用的发送Ajax请求的方法有哪些&#xff1f; xhr​​ new XMLHttpRequest() xhr.open()、xhr.send()(真正开发中很少用到&#xff0c;太麻烦了&#xff0c;我们一般使用的都是他的二次封装) ​jQuery​​ 其对xhr有二次封装 . g e t ( ) 、 .get()、 .get()、.post ​…

关于Chrome DevTool

1.基本 打开开发者工具&#xff1a;F12 打开命令菜单&#xff1a;ctrlshiftp DevTool黑色主题&#xff1a;在命令菜单中输入dark theme 截图&#xff1a;命令菜单输入screenshot dock&#xff1a;undock将开发者工具变成一个独立的出口&#xff0c;dock to right 2.Elements面…

【C++/嵌入式笔试面试八股】一、31.C++相关基础 | 函数 | 封装

相关基础 01.C++和C语言的区别🍊 面向对象编程支持:C++是一种支持面向对象编程的语言,而C语言不支持面向对象编程。类型检查:C++中有更加严格的类型检查,相对于C语言来说更加严格。标准库:C++标准库中包含了很多C语言中没有的特性,如容器、迭代器、算法等。多重继承:…

什么?电路板上还要喷漆?

什么是三防漆&#xff1f; 三防漆是一种特殊配方的涂料&#xff0c;用于保护线路板及其相关设备免受环境的侵蚀。三防漆具有良好的耐高低温性能&#xff1b;其固化后成一层透明保护膜&#xff0c;具有优越的绝缘、防潮、防漏电、防震、防尘、防腐蚀、防老化、耐电晕等性能。 在…

【vue3】需要了解哪些【全】

这里写目录标题 一.vue3入门1. vue3带来了什么2. vue3工程的创建1. 使用vue-cli创建2. 使用vite创建vite与webpack的区别 二、常用Composition API1. setup(函数和语法糖)2. ref 和reactive3. vue3的响应式原理1. Vue2 的响应式原理2.vue3的的响应式原理 4.computed5.watch6. w…

json数组能不能放到hashmap中

可以将 JSON 数组放到 HashMap 中&#xff0c;但需要注意以下几点&#xff1a; HashMap 的值必须是单个对象&#xff0c;而不是数组。因此&#xff0c;您需要将 JSON 数组转换为一个对象&#xff0c;然后将该对象存储在 HashMap 中。 在将 JSON 数组转换为对象时&#xff0c;您…

邂逅Webpack和打包过程

1 认识webpack工具 2 webpack基本打包 3 webpack配置文件 4 编写和打包CSS文件 5 编写和打包LESS文件 6 postcss工具处理CSS 从脚手架打包成普通的htmlcssjs文件 内置模块path&#xff1a; 拼接路径 const path require("path")const filepath "C://abc/…