stable-diffusion-webui 使用

  • 启动含api的webui
webui.bat --api --listen
bash webui.sh --api  --listen
  • Create environment
conda create -n StableDiffusion python=3.10.6
  • Activate environment
conda activate StableDiffusion
  • Validate environment is selected
conda env list
  • Start local webserver
webui-user.bat

Wait for "Running on local URL: http://127.0.0.1:7860" and open that URI.

  • conda 安装设置国内镜像
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/main/
conda config --add channels https://mirrors.aliyun.com/anaconda/pkgs/free/
conda config --add channels https://mirrors.aliyun.com/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.aliyun.com/anaconda/cloud/menpo/
conda config --add channels https://mirrors.aliyun.com/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.aliyun.com/anaconda/cloud/msys2/
  • 验证是否成功设置阿里云镜像
conda config --set show_channel_urls yes
  • pip设置阿里云镜像
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
  • 验证是否成功设置了阿里云的镜像
pip config list
  • github上无法下载,手动安装包进行安装:
python setup.py build install
  • 生成时报错:RuntimeError: "log_vml_cpu" not implemented for 'Half'

修改modules/paths_internal.py启动参数

commandline_args = os.environ.get('COMMANDLINE_ARGS', "--skip-torch-cuda-test --precision full --no-half")
sys.argv += shlex.split(commandline_args)
  • 安装tb-lightly失败,使用阿里云镜像
 pip install tb-nightly -i https://mirrors.aliyun.com/pypi/simple
  • API SDK
https://github.com/mix1009/sdwebuiapi
  • API 文档
http://localhost:7860/docs
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容