公司核准名称网站,php网站开发工程师教程,用响应式做旧书网站,山东网站备案欢迎关注我的CSDN#xff1a;https://spike.blog.csdn.net/ 本文地址#xff1a;https://spike.blog.csdn.net/article/details/141140498 免责声明#xff1a;本文来源于个人知识与公开资料#xff0c;仅用于学术交流#xff0c;欢迎讨论#xff0c;不支持转载。 ComfyU… 欢迎关注我的CSDNhttps://spike.blog.csdn.net/ 本文地址https://spike.blog.csdn.net/article/details/141140498 免责声明本文来源于个人知识与公开资料仅用于学术交流欢迎讨论不支持转载。 ComfyUI 是功能强大且高度模块化的 AI 绘画工具基于 Stable Diffusion 技术采用节点式工作流界面使用户能够更直观地控制图像生成过程。特点是模块化设计允许用户通过拖放节点来创建和调整工作流极大地提高了灵活性和可定制性。速度更快灵活的组建工作流专业团队的需求节点式编辑。
GitHub: https://github.com/comfyanonymous/ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI配置 conda 环境
conda create -n comfyui python3.9
pip install torch1.13.1cu117 torchvision0.14.1cu117 torchaudio0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
pip install numpy1.26.4Numpy 必须是 1.x 版本否则报错
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.安装其他库
pip install -r requirements.txt启动任务默认端口是 8188
python3 main.py --listen 0.0.0.0
# nohup python3 -u main.py --listen 0.0.0.0 nohup.run_main.out
# ps -aux | grep main.py
# kill -9 [pid]启动成功的日志例如 http://[your ip]:8188/
Total VRAM 81052 MB, total RAM 1031523 MB
pytorch version: 1.13.1cu117
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA A100-SXM4-80GB :
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
[Prompt Server] web root: workspace_comfyui/ComfyUI/webImport times for custom nodes:0.0 seconds: workspace_comfyui/ComfyUI/custom_nodes/websocket_image_save.pyStarting serverTo see the GUI go to: http://0.0.0.0:8188ComfyUI 启动成功 ComfyUI 支持复用 Stable Diffusion WebUI 的配置修改 extra_model_paths.yaml
a111:base_path: workspace/stable_diffusion_webui/checkpoints: models/Stable-diffusionconfigs: models/Stable-diffusionvae: models/VAEloras: |models/Loramodels/LyCORISupscale_models: |models/ESRGANmodels/RealESRGANmodels/SwinIRembeddings: embeddingshypernetworks: models/hypernetworkscontrolnet: extensions/sd-webui-controlnet/models注意需要修改 controlnet 的默认模型路径这个部分与默认不一致其他逐个验证即可。 在 workspace_comfyui/ComfyUI/custom_nodes 文件夹中安装自定义 ComfyUI-Manager 插件
ComfyUI-Manager: https://github.com/ltdrdata/ComfyUI-Manager 第 1 次启动时需要等待安装配置## ComfyUI-Manager: installing dependencies. (GitPython) 安装翻译插件AIGODLIKE-ComfyUI-Translation重启服务即可
cd custom_nodes
git clone https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Translation.git将 ComfyUI 页面翻译成中文 点击 Queue Prompt即可运行程序。 提示词
beautiful scenery nature glass bottle landscape, purple galaxy bottle,美丽的风景自然玻璃瓶景观紫色银河瓶。
如图所示 运行报错 File workspace_comfyui/ComfyUI/custom_nodes/ComfyUI-Manager/glob/manager_server.py, line 1710, in lambdathreading.Thread(targetlambda: asyncio.run(default_cache_update())).start()File envs/comfyui/lib/python3.9/asyncio/runners.py, line 44, in runreturn loop.run_until_complete(main)File aiohttp/client_reqrep.py, line 1014, in startself._continue NoneFile aiohttp/helpers.py, line 713, in __exit__raise asyncio.TimeoutError from None
asyncio.exceptions.TimeoutError原因是 GitHub 国内访问异常使用代理即可参考源码 ComfyUI-Manager/glob/manager_server.py#1688即
async def default_cache_update():async def get_cache(filename):# uri https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/ filenameuri https://mirror.ghproxy.com/https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/ filenamecache_uri str(core.simple_hash(uri)) _ filenamecache_uri os.path.join(core.cache_dir, cache_uri)json_obj await core.get_data(uri, True)with core.cache_lock:with open(cache_uri, w, encodingutf-8) as file:json.dump(json_obj, file, indent4, sort_keysTrue)print(f[ComfyUI-Manager] default cache updated: {uri})a get_cache(custom-node-list.json)b get_cache(extension-node-map.json)c get_cache(model-list.json)d get_cache(alter-list.json)e get_cache(github-stats.json)await asyncio.gather(a, b, c, d, e)threading.Thread(targetlambda: asyncio.run(default_cache_update())).start()修改 uri增加 https://mirror.ghproxy.com/ 前缀即可
参考https://github.com/runningcheese/MirrorSite