{"id":16941,"date":"2025-02-20T22:48:14","date_gmt":"2025-02-20T14:48:14","guid":{"rendered":"https:\/\/92it.top\/?p=16941"},"modified":"2025-02-20T22:49:01","modified_gmt":"2025-02-20T14:49:01","slug":"mac%e5%ae%89%e8%a3%85%e5%90%af%e5%8a%a8comfyui-%e7%9a%84%e8%af%a6%e7%bb%86%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=16941","title":{"rendered":"Mac\u5b89\u88c5\u542f\u52a8ComfyUI \u7684\u8be6\u7ec6\u6559\u7a0b"},"content":{"rendered":"\n<p>ComfyUI \u662f\u4e00\u4e2a\u6a21\u5757\u5316\u7684 Stable<a href=\"https:\/\/zhida.zhihu.com\/search?content_id=241176537&amp;content_type=Article&amp;match_order=1&amp;q=Stable+Diffusion&amp;zhida_source=entity\" target=\"_blank\" rel=\"noreferrer noopener\"> <\/a>Diffusion GUI\uff0c\u5de5\u4f5c\u754c\u9762\u662f\u53ef\u89c6\u5316\u7684\u6d41\u7a0b\u8282\u70b9\u5f0f\u3002<\/p>\n\n\n\n<p>\u76f8\u5bf9\u4e8e Stable Diffusion WebUI \u751f\u6210\u56fe\u50cf\u66f4\u52a0\u76f4\u89c2\u6613\u63a7\u5236\uff0c\u4f46\u662f\u4e5f\u4f1a\u66f4\u590d\u6742\uff0c\u95e8\u69db\u66f4\u9ad8\uff0c\u65b0\u624b\u8fd8\u662f\u5efa\u8bae\u5148\u90e8\u7f72 Stable Diffusion WebUI \u540e\uff0c\u5c06 SD \u7684\u5de5\u4f5c\u6d41\u7a0b\u719f\u6089\u8d77\u6765\u518d\u4f7f\u7528 ComfyUI\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5\u6b65\u9aa4<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u524d\u63d0\u6761\u4ef6<\/p>\n\n\n\n<ul>\n<li>Mac computers with Apple silicon or AMD GPUs<\/li>\n\n\n\n<li>macOS 12.3 or later<\/li>\n\n\n\n<li>Python 3.7 or later<\/li>\n\n\n\n<li>Xcode command-line tools: <code>xcode-select --install<\/code><\/li>\n<\/ul>\n\n\n\n<p><strong>1. \u4e0b\u8f7dComfyUI\u7684\u4ee3\u7801<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">git clone https:\/\/github.com\/comfyanonymous\/ComfyUI.git<\/pre>\n\n\n\n<p><strong>2.\u5207\u6362\u5230ComfyUI\u5de5\u7a0b\u8def\u5f84\uff0c\u521b\u5efapython\u865a\u62df\u73af\u5883<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd ComfyUI\npython3.10 -m venv venv-comfyui<\/pre>\n\n\n\n<p><strong>3.\u6fc0\u6d3bpython\u73af\u5883<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">source venv-comfyui\/bin\/activate<\/pre>\n\n\n\n<p><strong>4.\u5b89\u88c5mac PyTorch with MPS support<\/strong><\/p>\n\n\n\n<p>\u53c2\u8003\uff1a<a href=\"https:\/\/developer.apple.com\/metal\/pytorch\">https:\/\/developer.apple.com\/metal\/pytorch<\/a><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pip install --pre torch torchvision torchaudio --extra-index-url https:\/\/download.pytorch.org\/whl\/nightly\/cpu<\/pre>\n\n\n\n<p><strong>5.\u6d4b\u8bd5mps\u662f\u5426\u5b89\u88c5\u6210\u529f<\/strong><\/p>\n\n\n\n<p>\u521b\u5efa\u4e00\u4e2apython\u6587\u4ef6test.py\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import torch\nif torch.backends.mps.is_available():\n    mps_device = torch.device(\"mps\")\n    x = torch.ones(1, device=mps_device)\n    print (x)\nelse:\n    print (\"MPS device not found.\")<\/pre>\n\n\n\n<p>\u6267\u884c\u8be5\u6587\u4ef6\uff0c\u770b\u8f93\u51fa\u7ed3\u679c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python test.py<\/pre>\n\n\n\n<p>\u5982\u679c\u8f93\u51fa\u5982\u4e0b\uff0c\u5219\u5b89\u88c5\u6210\u529f<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">tensor([1.], device='mps:0')\n<\/pre>\n\n\n\n<p><strong>6.\u5b89\u88c5ComfyUI\u4f9d\u8d56<\/strong><\/p>\n\n\n\n<p>\u8981\u8fdb\u5165 ComfyUI \u76ee\u5f55\uff0c\u7136\u540e\u518d\u7528\u4ee3\u7801 <code>pip install -r requirements.txt<\/code> \u6765\u5b89\u88c5 Dependencies\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pip install -r requirements.txt<\/pre>\n\n\n\n<p>7.\u542f\u52a8ComfyUI\u753b\u9762<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python main.py<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">(venv-comfyui) xxx@xxxMac-mini ComfyUI % python main.py<br>Checkpoint files will always be loaded safely.<br>Total VRAM 24576 MB, total RAM 24576 MB<br>pytorch version: 2.7.0.dev20250220<br>Set vram state to: SHARED<br>Device: mps<br>Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention<br>ComfyUI version: 0.3.14<br>****** User settings have been changed to be stored on the server instead of browser storage. ******<br>****** For multi-user setups add the --multi-user CLI argument to enable multiple user profiles. ******<br>[Prompt Server] web root: \/Users\/xxxx\/Documents\/ComfyUI\/ComfyUI\/web<br><br>Import times for custom nodes:<br>   0.0 seconds: \/Users\/xxx\/Documents\/ComfyUI\/ComfyUI\/custom_nodes\/websocket_image_save.py<br><br>Starting server<br><br>To see the GUI go to: http:\/\/127.0.0.1:8188<br><br>\u542f\u52a8\u540e\u53ef\u4ee5\u770b\u5230 Stable Diffusion GUI \u7684\u754c\u9762\u7c7b\u4f3c\u4e00\u4e2a\u601d\u7ef4\u5bfc\u56fe\u7684\u8282\u70b9\u5de5\u4f5c\u6d41\u7a0b\u754c\u9762\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4e0d\u8981\u5173\u95ed\u7ec8\u7aef\u3002<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"423\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-1024x423.png\" alt=\"\" class=\"wp-image-16942\" style=\"width:574px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-1024x423.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-300x124.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-768x317.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-1536x635.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-2048x846.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-830x343.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-230x95.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-350x145.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/02\/image-27-480x198.png 480w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>ComfyUI \u662f\u4e00\u4e2a\u6a21\u5757\u5316\u7684 Stable Diffusion GUI\uff0c\u5de5\u4f5c\u754c\u9762\u662f\u53ef\u89c6\u5316\u7684\u6d41\u7a0b\u8282\u70b9\u5f0f\u3002 \u76f8\u5bf9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16941"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16941"}],"version-history":[{"count":2,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16941\/revisions"}],"predecessor-version":[{"id":16944,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/16941\/revisions\/16944"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}