{"id":18978,"date":"2024-08-30T10:11:56","date_gmt":"2024-08-30T02:11:56","guid":{"rendered":"https:\/\/www.1ai.net\/?p=18978"},"modified":"2024-08-30T10:11:56","modified_gmt":"2024-08-30T02:11:56","slug":"comfyui%e5%ae%89%e8%a3%85%e6%95%99%e7%a8%8b%ef%bc%8c%e8%ae%b2%e6%b8%85%e6%a5%9acomfyui%e5%ae%89%e8%a3%85%e9%83%a8%e7%bd%b2%e5%85%a8%e6%b5%81%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/18978.html","title":{"rendered":"ComfyUI installation tutorial, explain the whole process of ComfyUI installation and deployment"},"content":{"rendered":"<p>Since the launch of Flux, the latest dark horse literary model, the wave of Flux is sweeping the world with an unstoppable momentum. Currently, to play Flux in the local computer environment, the support methods are mainly<a href=\"https:\/\/www.1ai.net\/en\/tag\/comfyui\" title=\"_Other Organiser\" target=\"_blank\" >ComfyUI<\/a>However, the installation of the ComfyUI tool has always been a confusing place for many novices. In WeChat groups and private messages among friends, the environment configuration problem of ComfyUI has always been one of the most frequent problems.<\/p>\n<p>There are currently two main ways to install ComfyUI:<\/p>\n<ul>\n<li>Method 1: Use ComfyUI native installation package<\/li>\n<li>Method 2: Use Qiuye&#039;s ComfyUI integration package<\/li>\n<\/ul>\n<p>Both of these methods are used by people. In order to take care of the needs of different friends, I will write about the two installation methods of ComfyUI separately. Today we will first look at the installation method using the ComfyUI native installation package.<\/p>\n<p><strong>1. ComfyUI native package installation<a href=\"https:\/\/www.1ai.net\/en\/tag\/%e6%95%99%e7%a8%8b\" title=\"_Other Organiser\" target=\"_blank\" >Tutorial<\/a><\/strong><\/p>\n<p>ComfyUI native package download address:<\/p>\n<blockquote>\n<ul>\n<li>https:\/\/github.com\/comfyanonymous\/ComfyUI<\/li>\n<\/ul>\n<\/blockquote>\n<p>\u3010<strong>Step 1<\/strong>\u3011<strong>Download the native installation package<\/strong><\/p>\n<p>Enter from the above URL, in the Installing section, follow the red arrow to download the file to your local computer.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18979\" title=\"0b25a85aj00sj0dxi001cd000o600com\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/0b25a85aj00sj0dxi001cd000o600com.jpg\" alt=\"0b25a85aj00sj0dxi001cd000o600com\" width=\"870\" height=\"456\" \/><\/p>\n<p>The size of the installation package is currently about 1.35G. After downloading, put it in any directory and unzip it. Here we put it in the root directory of drive E. The folder after the compressed package is unzipped is ComfyUI_windows_portable.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18980\" title=\"7a1ba935j00sj0dxi000jd000ip005hm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/7a1ba935j00sj0dxi000jd000ip005hm.jpg\" alt=\"7a1ba935j00sj0dxi000jd000ip005hm\" width=\"673\" height=\"197\" \/><\/p>\n<p><strong>\u3010Step 2\u3011: Download the model<\/strong><\/p>\n<p>Commonly used model download websites:<\/p>\n<blockquote>\n<ul>\n<li><strong>Domestic LiblibAI:<\/strong>https:\/\/www.liblib.art\/<\/li>\n<li><strong>Foreign C Station:<\/strong>https:\/\/civitai.com (requires scientific Internet access)<\/li>\n<li><strong>Foreign Huggingface:<\/strong>\u00a0https:\/\/huggingface.co\/ (requires scientific Internet access)<\/li>\n<\/ul>\n<\/blockquote>\n<p>We put the downloaded model into the corresponding directory:<\/p>\n<ul>\n<li><strong>Large Model<\/strong>:\\ComfyUI_windows_portable\\ComfyUI\\models<\/li>\n<li>\\checkpoints<\/li>\n<li><strong>Loar Model<\/strong>:\\ComfyUI_windows_portable\\ComfyUI\\models\\loras<\/li>\n<li><strong>VAE Model<\/strong>:\\ComfyUI_windows_portable\\ComfyUI\\models\\vae<\/li>\n<li><strong>embeddings<\/strong>:\\ComfyUI_windows_portable\\ComfyUI\\models\\embeddings<\/li>\n<li><strong>ControlNet<\/strong>:\\ComfyUI_windows_portable\\ComfyUI\\models<\/li>\n<li>\\controlnet<\/li>\n<li><strong>Clip Node<\/strong>:\\ComfyUI_windows_portable\\ComfyUI\\models\\clip<\/li>\n<li><strong>Unet Node<\/strong>:\\ComfyUI_windows_portable\\ComfyUI\\models\\unet<\/li>\n<\/ul>\n<p><strong>Here we take the most commonly used large model majicMIX realistic as an example<\/strong><\/p>\n<blockquote>\n<ul>\n<li>LiblibAI: https:\/\/www.liblib.art\/modelinfo<\/li>\n<li>\/bced6d7ec1460ac7b923fc5bc95c4540<\/li>\n<\/ul>\n<\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18982\" title=\"2015d03cj00sj0dxi0021d000u000jrm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/2015d03cj00sj0dxi0021d000u000jrm.jpg\" alt=\"2015d03cj00sj0dxi0021d000u000jrm\" width=\"1080\" height=\"711\" \/><\/p>\n<p>Download it locally and place it in \\ComfyUI_windows_portable\\ComfyUI\\models<\/p>\n<p>\\checkpoints directory.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18981\" title=\"f4b96e39j00sj0dxi000dd000il0037m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/f4b96e39j00sj0dxi000dd000il0037m.jpg\" alt=\"f4b96e39j00sj0dxi000dd000il0037m\" width=\"669\" height=\"115\" \/><\/p>\n<p><strong>[Step 3]: Start the script<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18983\" title=\"d1bbf73aj00sj0dxi000kd000im005gm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/d1bbf73aj00sj0dxi000kd000im005gm.jpg\" alt=\"d1bbf73aj00sj0dxi000kd000im005gm\" width=\"670\" height=\"196\" \/><\/p>\n<p>If the computer has an N card, use the run_nvidia_gpu.bat script to start it. If the computer does not have an N card, use the run_cpu.bat script to start it. Just double-click to start.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18984\" title=\"a2c60214j00sj0dxi000ud000r3005xm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/a2c60214j00sj0dxi000ud000r3005xm.jpg\" alt=\"a2c60214j00sj0dxi000ud000r3005xm\" width=\"975\" height=\"213\" \/><\/p>\n<p>At this time, a ComfyUI management interface will automatically open in the browser. If it is not open, directly enter http:\/\/127.0.0.1:8188 in the browser.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18985\" title=\"30c95b7fj00sj0dxi000rd000u000a5m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/30c95b7fj00sj0dxi000rd000u000a5m.jpg\" alt=\"30c95b7fj00sj0dxi000rd000u000a5m\" width=\"1080\" height=\"365\" \/><\/p>\n<p><strong>[Step 4]: Image generation<\/strong><\/p>\n<p>We enter a hint, adjust the parameters set, click on the Queue Prompt button, and you can generate a picture\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18986\" title=\"b2f16ac7j00sj0dxi000qd000u00097m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/b2f16ac7j00sj0dxi000qd000u00097m.jpg\" alt=\"b2f16ac7j00sj0dxi000qd000u00097m\" width=\"1080\" height=\"331\" \/><\/p>\n<p>In the console we can see the progress information of image generation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18987\" title=\"91df5052j00sj0dxi000xd000qp0063m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/91df5052j00sj0dxi000xd000qp0063m.jpg\" alt=\"91df5052j00sj0dxi000xd000qp0063m\" width=\"961\" height=\"219\" \/><\/p>\n<p>Related instructions: The default loaded workflow may not have our newly downloaded model. At this time, click the &quot;Refresh&quot; button on the right to load the new model.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18988\" title=\"dd718582j00sj0dxi0008d0004e007wm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/dd718582j00sj0dxi0008d0004e007wm.jpg\" alt=\"dd718582j00sj0dxi0008d0004e007wm\" width=\"158\" height=\"284\" \/><\/p>\n<p>At this point, the installation of ComfyUI is basically completed.<\/p>\n<p><strong>2. ComfyUI native decompression package directory description<\/strong><\/p>\n<p>The folder after decompressing the ComfyUI installation package is ComfyUI_windows_portable. Below we will give a brief description of the function of each file or folder.<\/p>\n<p><strong>Files\/Folders<\/strong><\/p>\n<p><strong>Functional Description<\/strong><\/p>\n<p>ComfyUI<\/p>\n<p>ComfyUI main function folder<\/p>\n<p>python_embeded<\/p>\n<p>Independent dependent Python environment folder<\/p>\n<p>update<\/p>\n<p>Folders to be updated<\/p>\n<p>README_VERY_IMPORTANT.txt<\/p>\n<p>Very important instructions for use<\/p>\n<p>run_cpu.bat<\/p>\n<p>Startup script when the computer has no GPU (N card)<\/p>\n<p>run_nvidia_gpu.bat<\/p>\n<p>Start the script when the computer has a GPU (N card)<\/p>\n<p>Let&#039;s take a brief look at the important files\/folders below.<\/p>\n<p><strong>(1) ComfyUI<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18989\" title=\"038bae8bj00sj0dxi001pd000ir00iqm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/038bae8bj00sj0dxi001pd000ir00iqm.jpg\" alt=\"038bae8bj00sj0dxi001pd000ir00iqm\" width=\"675\" height=\"674\" \/><\/p>\n<p>The contents of this folder are basically the same as the directory on the ComfyUI installation package web page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18991\" title=\"ac8dd005j00sj0dxi002yd000ph00t2m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/ac8dd005j00sj0dxi002yd000ph00t2m.jpg\" alt=\"ac8dd005j00sj0dxi002yd000ph00t2m\" width=\"917\" height=\"1046\" \/><\/p>\n<p>Below we focus on a few common directories.<\/p>\n<p><strong>custom_nodes<\/strong>: Installation directory of the plugin node<\/p>\n<p><strong>models<\/strong>: File storage paths for various large models, LORA models, VAE models, and ControlNet<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18990\" title=\"18a2f5c6j00sj0dxi000ud000hy00ajm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/18a2f5c6j00sj0dxi000ud000hy00ajm.jpg\" alt=\"18a2f5c6j00sj0dxi000ud000hy00ajm\" width=\"646\" height=\"379\" \/><\/p>\n<p><strong>(2) update<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18992\" title=\"ef810929j00sj0dxi000dd000ik003lm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/ef810929j00sj0dxi000dd000ik003lm.jpg\" alt=\"ef810929j00sj0dxi000dd000ik003lm\" width=\"668\" height=\"129\" \/><\/p>\n<p><strong>update_comfyui.bat<\/strong>: Used to update ComfyUI. If the official website has the latest version of ComfyUI, you can double-click this script to update and upgrade.<\/p>\n<p><strong>update_comfyui_and_python_dependencies.bat<\/strong>: To update ComfyUI with python dependencies, note that this command should only be run if there is a problem with python dependencies.<\/p>\n<p><strong>(3)README_VERY_IMPORTANT.txt<\/strong><\/p>\n<p>Very important instructions for use. I copied the content into Youdao Translation (removing some spaces and blank lines). You can check it out.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18993\" title=\"bf682306j00sj0dxi001md000u000a9m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/bf682306j00sj0dxi001md000u000a9m.jpg\" alt=\"bf682306j00sj0dxi001md000u000a9m\" width=\"1080\" height=\"369\" \/><\/p>\n<p><strong>3. Sharing Models with SD WebUI<\/strong><\/p>\n<p>Friends who are used to using SD Web UI may have downloaded a lot of models. The directories of these models are inconsistent with the directories where ComfyUI models are stored. ComfyUI officials have also considered this problem and provided a solution to enable ComfyUI to share SD Web UI models.<\/p>\n<p>Go to the \\ComfyUI_windows_portable\\ComfyUI directory and find the extra_model_paths.yaml.example file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18995\" title=\"bf1dde6fj00sj0dxi001pd000jn00ivm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/bf1dde6fj00sj0dxi001pd000jn00ivm.jpg\" alt=\"bf1dde6fj00sj0dxi001pd000jn00ivm\" width=\"707\" height=\"679\" \/><\/p>\n<p>Rename the file, remove the .example suffix, change the file name to extra_model_paths.yaml, and then open it with a text editing tool.<\/p>\n<p>The initial file content is this<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18994\" title=\"4fe8eab8j00sj0dxi000yd000g900bjm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/4fe8eab8j00sj0dxi000yd000g900bjm.jpg\" alt=\"4fe8eab8j00sj0dxi000yd000g900bjm\" width=\"585\" height=\"415\" \/><\/p>\n<p>Then replace the value of the base_path field with the path where we installed SD WebUI locally.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18996\" title=\"573e616bj00sj0dxi0010d000gr00bhm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/573e616bj00sj0dxi0010d000gr00bhm.jpg\" alt=\"573e616bj00sj0dxi0010d000gr00bhm\" width=\"603\" height=\"413\" \/><\/p>\n<p>Then restart ComfyUI and it will be fine.<\/p>\n<p><strong>4. ComfyUI Chinese plug-in installation<\/strong><\/p>\n<p>The ComfyUI above is installed in English by default. Many friends are still accustomed to using the Chinese version. Here we need to install a Chinese plug-in.<\/p>\n<blockquote>\n<ul>\n<li>Chinese plugin address: https:\/\/github.com\/AIGODLIKE\/AIGODLIKE-ComfyUI-Translation<\/li>\n<\/ul>\n<\/blockquote>\n<p>The installation of the plug-in address will be explained later. Here we only need to download it directly from the website through the above address.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18997\" title=\"31c08a3ej00sj0dxi000ud000u000arm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/31c08a3ej00sj0dxi000ud000u000arm.jpg\" alt=\"31c08a3ej00sj0dxi000ud000u000arm\" width=\"1080\" height=\"387\" \/><\/p>\n<p>Unzip the downloaded file and put it in the \\ComfyUI_windows_portable\\ComfyUI\\custom_nodes directory.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18999\" title=\"c4f1a8bdj00sj0dxi000cd000hk0035m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/c4f1a8bdj00sj0dxi000cd000hk0035m.jpg\" alt=\"c4f1a8bdj00sj0dxi000cd000hk0035m\" width=\"632\" height=\"113\" \/><\/p>\n<p>Restart ComfyUI. You can see that the ComfyUI interface automatically changes to Chinese.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18998\" title=\"9c9b030aj00sj0dxi000pd000u000aam\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/9c9b030aj00sj0dxi000pd000u000aam.jpg\" alt=\"9c9b030aj00sj0dxi000pd000u000aam\" width=\"1080\" height=\"370\" \/><\/p>\n<p>If you do not become Chinese, you can set the field AGLTranslation-langualge to Chinese by clicking on the Settings button to open the interface\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19000\" title=\"9b55ea89j00sj0dxi000od000u000btm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/08\/9b55ea89j00sj0dxi000od000u000btm.jpg\" alt=\"9b55ea89j00sj0dxi000od000u000btm\" width=\"1080\" height=\"425\" \/><\/p>\n<p>In this way, the ComfyUI operating interface has been localized in Chinese.<\/p>\n<p>Okay, that\u2019s all for today\u2019s sharing. I hope that what I shared today will be helpful to you.<\/p>","protected":false},"excerpt":{"rendered":"<p>Since the launch of Flux, the latest dark horse Vincennes model, the wave of Flux is sweeping the world with an unstoppable momentum, the current local computer environment to play Flux, the main way to support ComfyUI. but ComfyUI tool installation has been a lot of white people more confusing place in the microblogging group and the private message of partners, the ComfyUI environment configuration issues has been one of the high-frequency problems. At present, there are two main ways to install ComfyUI: Way 1: Use ComfyUI native installation package Way 2: Use the ComfyUI integration package of the big brother of the autumn leaves These two ways are used, in order to take care of the needs of different partners, I will write about the two ways of installing ComfyUI separately. Today I<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,144],"tags":[1989,3853,4198],"collection":[],"class_list":["post-18978","post","type-post","status-publish","format-standard","hentry","category-jiaocheng","category-baike","tag-comfyui","tag-flux","tag-4198"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/18978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/comments?post=18978"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/18978\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=18978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=18978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=18978"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=18978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}