[深度学习]stable-diffusion-webui部署后局域网无法访问

[深度学习]stable-diffusion-webui部署后局域网无法访问

    正在检查是否收录...

当你把stable-diffusion-webui环境安装好后,启动python webui.py后发现,局域网里面是不能访问这个网页的,为了解决这个问题翻阅资料发现解决起来很简单。我们去

stable-diffusion-webui/modules/shared.py这个文件,把--listen设置为True,具体看下面代码

parser.add_argument("--always-batch-cond-uncond", action='store_true', help="a workaround test; may help with speed if you use --lowvram") parser.add_argument("--unload-gfpgan", action='store_true', help="unload GFPGAN every time after processing images. Warning: seems to cause memory leaks") parser.add_argument("--precision", type=str, help="evaluate at this precision", choices=["full", "autocast"], default="autocast") parser.add_argument("--share", action='store_true', help="use share=True for gradio and make the UI accessible through their site (doesn't work for me but you might have better luck)") parser.add_argument("--esrgan-models-path", type=str, help="path to directory with ESRGAN models", default=os.path.join(script_path, 'ESRGAN')) parser.add_argument("--opt-split-attention", action='store_true', help="enable optimization that reduce vram usage by a lot for about 10%% decrease in performance") parser.add_argument("--listen", action='store_true',default=True, help="launch gradio with 0.0.0.0 as server name, allowing to respond to network requests") parser.add_argument("--port", type=int, help="launch gradio with given server port, you need root/admin rights for ports < 1024, defaults to 7860 if available", default=None) parser.add_argument("--show-negative-prompt", action='store_true', help="enable the field that lets you input negative prompt", default=False) cmd_opts = parser.parse_args()

增加default=True即可。

parseactionstoreganwebuiwebgradiosharepromptdiffusioncodepythonscripturlcto
  • 本文作者:李琛
  • 本文链接: https://wapzz.net/post-1854.html
  • 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。
本站部分内容来源于网络转载,仅供学习交流使用。如涉及版权问题,请及时联系我们,我们将第一时间处理。
文章很赞!支持一下吧 还没有人为TA充电
为TA充电
还没有人为TA充电
0
  • 支付宝打赏
    支付宝扫一扫
  • 微信打赏
    微信扫一扫
感谢支持
文章很赞!支持一下吧
关于作者
2.3W+
5
0
1
WAP站长官方

StoryNest.ai:将个性化故事与AI相结合 允许用户与故事角色互动

上一篇

GPT被评选为瑞士年度词汇

下一篇
  • 复制图片
按住ctrl可打开默认菜单