{"id":464099,"date":"2025-06-22T09:00:12","date_gmt":"2025-06-22T09:00:12","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=464099"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-06-22T09:00:12","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=464099","title":{"rendered":"<span>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Stable Diffusion + ComfyUI<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/h3>\n<p>\u042f \u043f\u0438\u0448\u0443 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u0430\u043a \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f (\u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c) \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0437\u0435\u0439. \u0412\u0441\u0435 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0433\u0443\u0433\u043b\u0438\u0442\u044c, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0443\u0436\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b, \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u043b, \u043f\u043e\u0447\u0430\u0442\u043e\u0433\u0435\u043f\u0435\u0442\u0438\u043b \u0438 \u0441\u043e\u0431\u0440\u0430\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>\u042f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439, \u044d\u0442\u043e \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u044b\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u0442.\u043a. \u044f \u043f\u0440\u043e\u0448\u0435\u043b\u0441\u044f \u043f\u043e \u0433\u0440\u0430\u0431\u043b\u044f\u043c \u0438 \u043d\u0430\u0448\u0451\u043b \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0421\u043e\u0432\u0435\u0442\u044b \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u0441\u044f\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f.<\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p>\u041c\u043e\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: OS: Linux Mint 22 x86_64, GPU: NVIDIA 5070 Ti, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d NVIDIA driver 570.153.02.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c,  \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python\u202f\u2265\u202f3.9:<\/p>\n<pre><code class=\"bash\">python3 --version <\/code><\/pre>\n<p>\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<pre><code class=\"bash\">sudo apt update sudo apt install python3-pip python3-venv git cmake xdg-utils <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 GPU \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">$ nvidia-smi Sat Jun 21 11:07:37 2025        +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 570.153.02             Driver Version: 570.153.02     CUDA Version: 12.8     | |-----------------------------------------+------------------------+----------------------+ | GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC | | Fan  Temp   Perf          Pwr:Usage\/Cap |           Memory-Usage | GPU-Util  Compute M. | |                                         |                        |               MIG M. | |=========================================+========================+======================| |   0  NVIDIA GeForce RTX 5070 Ti     Off |   00000000:01:00.0  On |                  N\/A | |  0%   51C    P5             34W \/  300W |    1443MiB \/  16303MiB |     21%      Default | |                                         |                        |                  N\/A | +-----------------------------------------+------------------------+----------------------+  <\/code><\/pre>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f CUDA, \u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u0441\u0451 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Comfy\u202fCLI, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043d\u044f\u043b, \u044d\u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431.<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/strong>:<\/p>\n<pre><code class=\"bash\">python3 -m venv comfy-env source comfy-env\/bin\/activate <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c Comfy\u202fCLI<\/strong>:<\/p>\n<pre><code class=\"bash\">pip install comfy-cli <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c \u0441\u0430\u043c ComfyUI<\/strong><\/p>\n<pre><code class=\"bash\">comfy install <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c PyTorch \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 CUDA<\/strong><\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441-URL \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 CUDA. \u042f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043f\u043e \u0441\u043e\u0432\u0435\u0442\u0443 ChatGPT \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0435 \u0442\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0414\u043b\u044f CUDA Version: 12.8 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"bash\">pip install --pre torch torchvision torchaudio --index-url https:\/\/download.pytorch.org\/whl\/nightly\/cu128 <\/code><\/pre>\n<p>\u041d\u0430\u0448\u0451\u043b \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0443\u0442 <a href=\"https:\/\/github.com\/comfyanonymous\/ComfyUI\/issues\/7127#issuecomment-2746096337\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/comfyanonymous\/ComfyUI\/issues\/7127#issuecomment-2746096337<\/a><\/p>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c GPU \u043d\u0430 Python, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0432\u0448\u0438\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/strong><\/p>\n<pre><code class=\"bash\">$ which python &lt;home&gt;\/comfy-env\/bin\/python $ python Python 3.12.3 (main, May 26 2025, 18:50:19) [GCC 13.3.0] on linux Type \"help\", \"copyright\", \"credits\" or \"license\" for more information. &gt;&gt;&gt; import torch &gt;&gt;&gt; print(torch.cuda.is_available()) True &gt;&gt;&gt; print(torch.version.cuda) 12.8 &gt;&gt;&gt;  <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u0438 Stable\u202fDiffusion<\/strong><\/p>\n<pre><code class=\"bash\">comfy model download --url &lt;URL&gt; --relative-path models\/checkpoints <\/code><\/pre>\n<p>\u042f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b <a href=\"https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0\/resolve\/main\/sd_xl_base_1.0.safetensors\" rel=\"noopener noreferrer nofollow\">sd_xl_base_1.0.safetensors<\/a> \u0438 <a href=\"https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-refiner-1.0\/resolve\/main\/sd_xl_refiner_1.0.safetensors\" rel=\"noopener noreferrer nofollow\">sd_xl_refiner_1.0.safetensors<\/a> \u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d refiner \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0438\u0448\u0443 \u043f\u043e\u0437\u0436\u0435, \u044f \u043f\u043e\u043a\u0430 \u0438\u0433\u0440\u0430\u044e\u0441\u044c \u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0443 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443 \u0435\u0449\u0451 \u043d\u0435 \u0434\u043e\u0434\u0435\u043b\u0430\u043b.<\/p>\n<p><strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c ComfyUI<\/strong><\/p>\n<pre><code class=\"bash\">comfy launch <\/code><\/pre>\n<p>\u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438\u0434\u0451\u043c \u0441\u044e\u0434\u0430:<\/p>\n<pre><code>http:\/\/localhost:8188 <\/code><\/pre>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d workflow \u043f\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/1m\/g5\/ef\/1mg5ef-9blgw83xhfjfhdlfr7-g.png\" sizes=\"(max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/webt\/1m\/g5\/ef\/1mg5ef-9blgw83xhfjfhdlfr7-g.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/webt\/1m\/g5\/ef\/1mg5ef-9blgw83xhfjfhdlfr7-g.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0447\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0437\u0434\u043e\u0440\u043e\u0432\u043e. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u043e.<\/p>\n<h3>Systemd\u2011\u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f ComfyUI<\/h3>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/strong><\/p>\n<pre><code class=\"bash\">sudo vim \/etc\/systemd\/system\/comfyui.service <\/code><\/pre>\n<p>\u0441 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code>[Unit] Description=ComfyUI Stable Diffusion Server After=network-online.target Wants=network-online.target  [Service] Type=simple User=&lt;user&gt; WorkingDirectory=&lt;home&gt;\/comfy\/ComfyUi ExecStart=&lt;home&gt;\/comfy\/start-comfyui.sh Restart=always RestartSec=5  [Install] WantedBy=multi-user.target <\/code><\/pre>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043a\u0440\u0438\u043f\u0442 <\/strong><code><strong>start-comfyui.sh<\/strong><\/code><\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  source &lt;home&gt;\/comfy-env\/bin\/activate cd &lt;home&gt;\/comfy\/ComfyUi exec python main.py --listen 0.0.0.0 <\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c<\/p>\n<pre><code class=\"bash\">chmod +x ~\/comfy\/start-comfyui.sh <\/code><\/pre>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/strong><\/p>\n<pre><code class=\"bash\">sudo systemctl daemon-reload sudo systemctl enable comfyui sudo systemctl start comfyui <\/code><\/pre>\n<p>\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/p>\n<pre><code class=\"bash\">$ systemctl status comfyui \u25cf comfyui.service - ComfyUI Stable Diffusion Server      Loaded: loaded (\/etc\/systemd\/system\/comfyui.service; enabled; preset: enabled)      Active: active (running) since Tue 2025-06-17 15:12:03 CST; 3 days ago    Main PID: 2127 (python)       Tasks: 63 (limit: 76101)      Memory: 16.4G (peak: 16.8G swap: 91.5M swap peak: 177.9M)         CPU: 4min 5.076s      CGroup: \/system.slice\/comfyui.service              \u2514\u25002127 python main.py --listen 0.0.0.0  <\/code><\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <strong>ComfyUI<\/strong> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 <strong>8188<\/strong>, \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>--port<\/code>.<\/p>\n<p><strong>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e \u0438\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0436\u0438\u0432\u043e\u0439:<\/p>\n<pre><code class=\"bash\">systemctl is-active comfyui <\/code><\/pre>\n<p>\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043b\u043e\u0433\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">journalctl -u comfyui --since \"15 minutes ago\" <\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430 \u0432\u0441\u0451. \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c, \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f\u043c, \u0441\u043e\u0432\u0435\u0442\u0430\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0434.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/920658\/\"> https:\/\/habr.com\/ru\/articles\/920658\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h3>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440<\/h3>\n<p>\u042f \u043f\u0438\u0448\u0443 \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u0430\u043a \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f (\u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c) \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0437\u0435\u0439. \u0412\u0441\u0435 \u044d\u0442\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0433\u0443\u0433\u043b\u0438\u0442\u044c, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0443\u0436\u0435 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b, \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u043b, \u043f\u043e\u0447\u0430\u0442\u043e\u0433\u0435\u043f\u0435\u0442\u0438\u043b \u0438 \u0441\u043e\u0431\u0440\u0430\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>\u042f \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0441\u044c \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439, \u044d\u0442\u043e \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u044b\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u043e \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u0442.\u043a. \u044f \u043f\u0440\u043e\u0448\u0435\u043b\u0441\u044f \u043f\u043e \u0433\u0440\u0430\u0431\u043b\u044f\u043c \u0438 \u043d\u0430\u0448\u0451\u043b \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0421\u043e\u0432\u0435\u0442\u044b \u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u0441\u044f\u043a\u0438 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f.<\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p>\u041c\u043e\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435: OS: Linux Mint 22 x86_64, GPU: NVIDIA 5070 Ti, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d NVIDIA driver 570.153.02.<\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c,  \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Python\u202f\u2265\u202f3.9:<\/p>\n<pre><code class=\"bash\">python3 --version <\/code><\/pre>\n<p>\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0430\u043a\u0435\u0442\u044b:<\/p>\n<pre><code class=\"bash\">sudo apt update sudo apt install python3-pip python3-venv git cmake xdg-utils <\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 GPU \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code class=\"bash\">$ nvidia-smi Sat Jun 21 11:07:37 2025        +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 570.153.02             Driver Version: 570.153.02     CUDA Version: 12.8     | |-----------------------------------------+------------------------+----------------------+ | GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC | | Fan  Temp   Perf          Pwr:Usage\/Cap |           Memory-Usage | GPU-Util  Compute M. | |                                         |                        |               MIG M. | |=========================================+========================+======================| |   0  NVIDIA GeForce RTX 5070 Ti     Off |   00000000:01:00.0  On |                  N\/A | |  0%   51C    P5             34W \/  300W |    1443MiB \/  16303MiB |     21%      Default | |                                         |                        |                  N\/A | +-----------------------------------------+------------------------+----------------------+  <\/code><\/pre>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f CUDA, \u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h3>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u0441\u0451 \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Comfy\u202fCLI, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043d\u044f\u043b, \u044d\u0442\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431.<\/p>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0438 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/strong>:<\/p>\n<pre><code class=\"bash\">python3 -m venv comfy-env source comfy-env\/bin\/activate <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c Comfy\u202fCLI<\/strong>:<\/p>\n<pre><code class=\"bash\">pip install comfy-cli <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c \u0441\u0430\u043c ComfyUI<\/strong><\/p>\n<pre><code class=\"bash\">comfy install <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c PyTorch \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 CUDA<\/strong><\/p>\n<p>\u0412\u0430\u0436\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441-URL \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 CUDA. \u042f, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043f\u043e \u0441\u043e\u0432\u0435\u0442\u0443 ChatGPT \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043d\u0435 \u0442\u0443 \u0432\u0435\u0440\u0441\u0438\u044e \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u0414\u043b\u044f CUDA Version: 12.8 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"bash\">pip install --pre torch torchvision torchaudio --index-url https:\/\/download.pytorch.org\/whl\/nightly\/cu128 <\/code><\/pre>\n<p>\u041d\u0430\u0448\u0451\u043b \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0442\u0443\u0442 <a href=\"https:\/\/github.com\/comfyanonymous\/ComfyUI\/issues\/7127#issuecomment-2746096337\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/comfyanonymous\/ComfyUI\/issues\/7127#issuecomment-2746096337<\/a><\/p>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c GPU \u043d\u0430 Python, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0432\u0448\u0438\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435<\/strong><\/p>\n<pre><code class=\"bash\">$ which python &lt;home&gt;\/comfy-env\/bin\/python $ python Python 3.12.3 (main, May 26 2025, 18:50:19) [GCC 13.3.0] on linux Type \"help\", \"copyright\", \"credits\" or \"license\" for more information. &gt;&gt;&gt; import torch &gt;&gt;&gt; print(torch.cuda.is_available()) True &gt;&gt;&gt; print(torch.version.cuda) 12.8 &gt;&gt;&gt;  <\/code><\/pre>\n<p><strong>\u0421\u0442\u0430\u0432\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u0438 Stable\u202fDiffusion<\/strong><\/p>\n<pre><code class=\"bash\">comfy model download --url &lt;URL&gt; --relative-path models\/checkpoints <\/code><\/pre>\n<p>\u042f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b <a href=\"https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-base-1.0\/resolve\/main\/sd_xl_base_1.0.safetensors\" rel=\"noopener noreferrer nofollow\">sd_xl_base_1.0.safetensors<\/a> \u0438 <a href=\"https:\/\/huggingface.co\/stabilityai\/stable-diffusion-xl-refiner-1.0\/resolve\/main\/sd_xl_refiner_1.0.safetensors\" rel=\"noopener noreferrer nofollow\">sd_xl_refiner_1.0.safetensors<\/a> \u0417\u0430\u0447\u0435\u043c \u043d\u0443\u0436\u0435\u043d refiner \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0438\u0448\u0443 \u043f\u043e\u0437\u0436\u0435, \u044f \u043f\u043e\u043a\u0430 \u0438\u0433\u0440\u0430\u044e\u0441\u044c \u0438 \u0437\u0430\u043c\u0435\u0442\u043a\u0443 \u043f\u043e \u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u043e\u0434\u0443 \u0435\u0449\u0451 \u043d\u0435 \u0434\u043e\u0434\u0435\u043b\u0430\u043b.<\/p>\n<p><strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c ComfyUI<\/strong><\/p>\n<pre><code class=\"bash\">comfy launch <\/code><\/pre>\n<p>\u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438\u0434\u0451\u043c \u0441\u044e\u0434\u0430:<\/p>\n<pre><code>http:\/\/localhost:8188 <\/code><\/pre>\n<p>\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d workflow \u043f\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u043a\u0430\u0447\u0430\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c, \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0447\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0437\u0434\u043e\u0440\u043e\u0432\u043e. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u043c \u044d\u0442\u043e.<\/p>\n<h3>Systemd\u2011\u0441\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f ComfyUI<\/h3>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/strong><\/p>\n<pre><code class=\"bash\">sudo vim \/etc\/systemd\/system\/comfyui.service <\/code><\/pre>\n<p>\u0441 \u0442\u0430\u043a\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre><code>[Unit] Description=ComfyUI Stable Diffusion Server After=network-online.target Wants=network-online.target  [Service] Type=simple User=&lt;user&gt; WorkingDirectory=&lt;home&gt;\/comfy\/ComfyUi ExecStart=&lt;home&gt;\/comfy\/start-comfyui.sh Restart=always RestartSec=5  [Install] WantedBy=multi-user.target <\/code><\/pre>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u043a\u0440\u0438\u043f\u0442 <\/strong><code><strong>start-comfyui.sh<\/strong><\/code><\/p>\n<pre><code class=\"bash\">#!\/bin\/bash  source &lt;home&gt;\/comfy-env\/bin\/activate cd &lt;home&gt;\/comfy\/ComfyUi exec python main.py --listen 0.0.0.0 <\/code><\/pre>\n<p>\u0414\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c<\/p>\n<pre><code class=\"bash\">chmod +x ~\/comfy\/start-comfyui.sh <\/code><\/pre>\n<p><strong>\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441<\/strong><\/p>\n<pre><code class=\"bash\">sudo systemctl daemon-reload sudo systemctl enable comfyui sudo systemctl start comfyui <\/code><\/pre>\n<p>\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/p>\n<pre><code class=\"bash\">$ systemctl status comfyui \u25cf comfyui.service - ComfyUI Stable Diffusion Server      Loaded: loaded (\/etc\/systemd\/system\/comfyui.service; enabled; preset: enabled)      Active: active (running) since Tue 2025-06-17 15:12:03 CST; 3 days ago    Main PID: 2127 (python)       Tasks: 63 (limit: 76101)      Memory: 16.4G (peak: 16.8G swap: 91.5M swap peak: 177.9M)         CPU: 4min 5.076s      CGroup: \/system.slice\/comfyui.service              \u2514\u25002127 python main.py --listen 0.0.0.0  <\/code><\/pre>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e <strong>ComfyUI<\/strong> \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u0442\u0443 <strong>8188<\/strong>, \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u043e\u0436\u043d\u043e, \u0443\u043a\u0430\u0437\u0430\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>--port<\/code>.<\/p>\n<p><strong>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0447\u0442\u043e-\u0442\u043e \u0438\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u0437\u0430\u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/strong><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 \u0436\u0438\u0432\u043e\u0439:<\/p>\n<pre><code class=\"bash\">systemctl is-active comfyui <\/code><\/pre>\n<p>\u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043b\u043e\u0433\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">journalctl -u comfyui --since \"15 minutes ago\" <\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u043e\u043a\u0430 \u0432\u0441\u0451. \u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f\u043c, \u0443\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u044f\u043c, \u0441\u043e\u0432\u0435\u0442\u0430\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0434.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/920658\/\"> https:\/\/habr.com\/ru\/articles\/920658\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-464099","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/464099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=464099"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/464099\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=464099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=464099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=464099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}