Win11 本地摆设大模子 WebUI + ComfyUI

打印 上一主题 下一主题

主题 974|帖子 974|积分 2937

Open WebUI 是一个可扩展、功能丰富且用户友好的自托管 Web 用户界面(WebUI),它被设计用于完全离线操纵。该项目最初被称为 Ollama WebUI,厥后更名为 Open WebUI。Open WebUI 的主要目的是为本地的大语言模子(LLMs)提供一个图形化的交互界面,使得用户能够更加方便地调试和调用本地模子,它不但支持本地模子,还兼容 Ollama 和 OpenAI 的 API,同时也支持长途服务器上的模子
win11 本地源码安装 Open WebUI

  1. git clone https://github.com/open-webui/open-webui.git
  2. cd open-webui
  3. copy .env.example .env
  4. # 编译前端
  5. npm install
  6. npm run build
  7. # 进入服务端文件夹
  8. cd .\backend
  9. # 可选: 通过 Conda 虚拟环境安装
  10. conda create --name open-webui-env
  11. conda activate open-webui-env
  12. pip install -r requirements.txt -U
  13. # 执行启动脚本 cd .\backend
  14. start_windows.bat
复制代码
修改运行参数(.env):
  1. OLLAMA_BASE_URL='http://localhost:11434'
  2. OPENAI_API_BASE_URL='https://domain.com/v1' # 可从接口查询可用模型
  3. OPENAI_API_KEY='sk-0lkurGuwZAg4T61oB00cD944Ec'
复制代码
支持的大模子

https://ollama.com/library
通过 WebUI 下载模子

直接搜索并下载
在这里插入图片描述

或打开管理员面板搜索安装:

通过 ollama 下载模子


  • 下载安装 Ollama:win11 安装包下载地点:https://ollama.com/download
  • 运行大模子
  1. ollama run llama3.1:8b
复制代码


  • 革新 webui 页面可以在列表中找到该模子

集成 SD 图像天生

   需已安装 stable-diffusion-webui
  

  1. # 设置 sd 以 api 服务方式运行
  2. set COMMANDLINE_ARGS=--xformers --enable-insecure-extension-access --nowebui --api --api-auth admin:1212 --listen --port 7860
复制代码

  • 起首,编写图像天生提示词,让文本天生模子原样回复
  • 完成后,您可以单击回复下方的图标来天生图像
  • 在图像完整天生后,可在聊天中查察

推荐 sd 插件

  1. git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser extensions/stable-diffusion-webui-images-browser
  2. git clone https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper extensions/Stable-Diffusion-Webui-Civitai-Helper
复制代码
https://github.com/Mikubill/sd-webui-controlnet
ComfyUI 安装


  • 下载源码安装依靠
  1. git clone https://github.com/comfyanonymous/ComfyUI.git
  2. cd ComfyUI.git
  3. /path-to-python10 -m venv venv
  4. pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
  5. pip install -r requirements.txt
复制代码

  • 修改运行参数参数,设置复用 stable-diffusion-webui 目录中的模子:
  1. # 在 ComfyUI 根目录中
  2. copy extra_model_paths.yaml.example extra_model_paths.yaml
  3. 指定 sd 文件夹路径:
  4. base_path: path/to/stable-diffusion-webui/
复制代码

  • 安装 ComfyUI-Manager
  1. cd custom_nodes
  2. git clone --depth=1 https://github.com/ltdrdata/ComfyUI-Manager.git
复制代码

  • 启动:
  1. python ./main.py
复制代码
问题:NumPy 2 报错,版本降级:
  1. pip uninstall numpy
  2. pip install numpy<2
复制代码

提示词

A captivating [south korean:Icelander:0.4:0.95] young woman sits at a desk in a brightly lit classroom. Herlong, flowing black-brown hair cascades down her back, framing a face that is both delicate and strong. Sunlight streams through the window, illuminating her piercing blue eyes and casting a warm glow on her skin. She leans forward, a hint of a smile playing on her lips, her fingers gently tracing the lines of a book she holds open in her lap. Her attire is simple yet elegant,a white blouse with a delicate lace collar and a flowing, navy blue skirt thatemphasizes her graceful figure. The room is filled with the scent of old books and the gentle murmur of students studying. The overall mood is one of quiet contemplation and intellectual curiosity, a moment captured in time of pure academic grace

参考

https://github.com/open-webui/open-webui
https://github.com/comfyanonymous/ComfyUI
欢迎合作

   如果这篇文章对您有所帮助,欢迎点赞、分享和留言,让更多的人受益。感谢您的细心阅读,如果发现了任何错误或须要增补的地方,请随时告诉我,我会尽快处理 ^_^

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

正序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

大连全瓷种植牙齿制作中心

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表