Win11 本地摆设大模子 WebUI + ComfyUI
Open WebUI 是一个可扩展、功能丰富且用户友好的自托管 Web 用户界面(WebUI),它被设计用于完全离线操纵。该项目最初被称为 Ollama WebUI,厥后更名为 Open WebUI。Open WebUI 的主要目的是为本地的大语言模子(LLMs)提供一个图形化的交互界面,使得用户能够更加方便地调试和调用本地模子,它不但支持本地模子,还兼容 Ollama 和 OpenAI 的 API,同时也支持长途服务器上的模子win11 本地源码安装 Open WebUI
git clone https://github.com/open-webui/open-webui.git
cd open-webui
copy .env.example .env
# 编译前端
npm install
npm run build
# 进入服务端文件夹
cd .\backend
# 可选: 通过 Conda 虚拟环境安装
conda create --name open-webui-env
conda activate open-webui-env
pip install -r requirements.txt -U
# 执行启动脚本 cd .\backend
start_windows.bat
修改运行参数(.env):
OLLAMA_BASE_URL='http://localhost:11434'
OPENAI_API_BASE_URL='https://domain.com/v1' # 可从接口查询可用模型
OPENAI_API_KEY='sk-0lkurGuwZAg4T61oB00cD944Ec'
支持的大模子
https://ollama.com/library
通过 WebUI 下载模子
直接搜索并下载
在这里插入图片描述
https://i-blog.csdnimg.cn/direct/6f31fe0a391a40c2bb96968791a86691.png
或打开管理员面板搜索安装:
https://i-blog.csdnimg.cn/direct/c75aef0580594b989d1ddb5312852bfb.png#pic_center
通过 ollama 下载模子
[*]下载安装 Ollama:win11 安装包下载地点:https://ollama.com/download
[*]运行大模子
ollama run llama3.1:8b
https://i-blog.csdnimg.cn/direct/69a4e46424654c4a8897b23d6176eaab.png#pic_center
[*]革新 webui 页面可以在列表中找到该模子
https://i-blog.csdnimg.cn/direct/3e9ba606dedf49c4bb3eaeca548cb05a.png#pic_center
集成 SD 图像天生
需已安装 stable-diffusion-webui
https://i-blog.csdnimg.cn/direct/48cb101b4f1648cca5f4dbdad70646f1.png#pic_center
# 设置 sd 以 api 服务方式运行
set COMMANDLINE_ARGS=--xformers --enable-insecure-extension-access --nowebui --api --api-auth admin:1212 --listen --port 7860
[*]起首,编写图像天生提示词,让文本天生模子原样回复
[*]完成后,您可以单击回复下方的图标来天生图像
[*]在图像完整天生后,可在聊天中查察
https://i-blog.csdnimg.cn/direct/aa34731f54e64c24b76401b31e91d273.png
推荐 sd 插件
git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser extensions/stable-diffusion-webui-images-browser
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 安装
[*]下载源码安装依靠
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI.git
/path-to-python10 -m venv venv
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
[*]修改运行参数参数,设置复用 stable-diffusion-webui 目录中的模子:
# 在 ComfyUI 根目录中
copy extra_model_paths.yaml.example extra_model_paths.yaml
指定 sd 文件夹路径:
base_path: path/to/stable-diffusion-webui/
[*]安装 ComfyUI-Manager
cd custom_nodes
git clone --depth=1 https://github.com/ltdrdata/ComfyUI-Manager.git
[*]启动:
python ./main.py
问题:NumPy 2 报错,版本降级:
pip uninstall numpy
pip install numpy<2
https://i-blog.csdnimg.cn/direct/f7a02e6d70284b76bd4136e1e3da3bbe.png#pic_center
提示词
A captivating 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://i-blog.csdnimg.cn/direct/f5baeec57cb84ade81bf5a52353419ec.png#pic_center
参考
https://github.com/open-webui/open-webui
https://github.com/comfyanonymous/ComfyUI
欢迎合作
如果这篇文章对您有所帮助,欢迎点赞、分享和留言,让更多的人受益。感谢您的细心阅读,如果发现了任何错误或须要增补的地方,请随时告诉我,我会尽快处理 ^_^
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]