{"slug": "install-comfyui-and-build-your-first-stable-diffusion-workflow", "title": "Install ComfyUI and Build Your First Stable Diffusion Workflow", "summary": "ComfyUI v0.33.1, released August 2026, can be installed locally to run Stable Diffusion 1.5 workflows, according to a tutorial by Mariana Souza on Sourcefeed. The guide walks through setting up ComfyUI, downloading the fp16 SD 1.5 checkpoint, building a text-to-image graph, adding a LoRA for style control, and integrating ESRGAN upscaling, requiring an NVIDIA GPU with 6 GB+ VRAM and about 8 GB free disk space.", "body_md": "# Install ComfyUI and Build Your First Stable Diffusion Workflow\n\nGet ComfyUI running locally, then wire a txt2img graph with a LoRA and ESRGAN upscaling.\n\n[Mariana Souza](https://sourcefeed.dev/u/mariana_souza)\n\n## What you'll build\n\nA local [ComfyUI](https://www.comfy.org/) install running Stable Diffusion 1.5, plus a node-based text-to-image workflow you'll extend with a LoRA for style control and an ESRGAN upscaler — all copy-pasteable from a clean machine.\n\n## Prerequisites\n\nVerified against ComfyUI v0.33.1 (August 2026) with PyTorch CUDA 13.0 wheels.\n\n[Python](https://www.python.org/)3.12 or 3.13 (3.13 is the best-supported; 3.14 works but some custom nodes break) and[Git](https://git-scm.com/)- An NVIDIA GPU with 6 GB+ VRAM for comfortable SD 1.5 use. AMD on Linux works via ROCm (swap the torch install for\n`--index-url https://download.pytorch.org/whl/rocm7.2`\n\n); Apple silicon works via PyTorch nightly. No GPU at all? Add`--cpu`\n\nto the launch command — slow but functional. - ~8 GB free disk for the code and models\n\nCommands below are for Linux/macOS; on Windows use `venv\\Scripts\\activate`\n\nand the same pip commands (or grab the portable build from comfy.org and skip section 1).\n\n## 1. Install ComfyUI\n\nClone the repo, create a virtual environment (ComfyUI's pinned deps will conflict with a system Python), and install PyTorch before the rest of the requirements:\n\n```\ngit clone https://github.com/comfyanonymous/ComfyUI.git\ncd ComfyUI\npython3 -m venv venv\nsource venv/bin/activate\npip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130\npip install -r requirements.txt\n```\n\n## 2. Download a checkpoint\n\nCheckpoints go in `models/checkpoints`\n\n. Grab the fp16 SD 1.5 base model from Comfy-Org's [Hugging Face](https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive) archive (~2 GB):\n\n```\ncurl -L -o models/checkpoints/v1-5-pruned-emaonly-fp16.safetensors \\\n  \"https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly-fp16.safetensors\"\n```\n\n## 3. Run the default txt2img workflow\n\n```\npython main.py\n```\n\nOpen `http://127.0.0.1:8188`\n\n. Load the default workflow via **Workflow → Browse Templates → Image Generation** (or it's already on the canvas on first launch). The graph reads left to right:\n\n``` php\nflowchart LR\n    LC[Load Checkpoint] --> CT1[CLIP Text Encode<br>positive]\n    LC --> CT2[CLIP Text Encode<br>negative]\n    EL[Empty Latent Image] --> KS[KSampler]\n    CT1 --> KS\n    CT2 --> KS\n    LC --> KS\n    KS --> VD[VAE Decode] --> SI[Save Image]\n```\n\nPick `v1-5-pruned-emaonly-fp16.safetensors`\n\nin **Load Checkpoint**, type a prompt into the positive **CLIP Text Encode** node, and hit **Run** (Ctrl+Enter). Images land in the `output/`\n\nfolder.\n\n## 4. Wire in a LoRA\n\nLoRAs are small adapter weights that restyle a checkpoint. They live in `models/loras`\n\n. The official docs use the SD 1.5-compatible blindbox LoRA from [Civitai](https://civitai.com/models/25995) (log in on the site if the direct download 401s):\n\n```\ncurl -L -o models/loras/blindbox_V1Mix.safetensors \\\n  \"https://civitai.com/api/download/models/32988?type=Model&format=SafeTensor&size=full&fp=fp16\"\n```\n\nBack in the browser, press **R** to refresh the model lists, then double-click empty canvas, search **Load LoRA**, and splice it between the checkpoint and everything downstream: Load Checkpoint's `MODEL`\n\n→ Load LoRA `model`\n\ninput, `CLIP`\n\n→ `clip`\n\ninput; then Load LoRA's outputs feed the KSampler and both CLIP Text Encode nodes. `strength_model`\n\nscales the LoRA's effect on the diffusion weights, `strength_clip`\n\non the text encoder — 1.0 for both is fine here. Add the trigger words `chibi, full body`\n\nto your prompt and run again; you'll get toy-figurine style renders. Chain a second Load LoRA node after the first to stack styles.\n\n## 5. Add upscaling\n\nSD 1.5 natively generates 512×512. Model-based upscaling gets you a clean 4× without re-diffusing. Download RealESRGAN into `models/upscale_models`\n\n:\n\n```\ncurl -L -o models/upscale_models/RealESRGAN_x4plus.pth \\\n  \"https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth\"\n```\n\nRefresh again, add a **Load Upscale Model** node and an **Upscale Image (using Model)** node. Wire VAE Decode's `IMAGE`\n\ninto the upscaler's `image`\n\ninput, the model loader into `upscale_model`\n\n, and hang a second **Save Image** off the output so you keep both sizes.\n\n## Verify it works\n\nOn launch the terminal should show your GPU and the server address:\n\n```\nTotal VRAM 12282 MB, total RAM 32017 MB\npytorch version: 2.8.0+cu130\nDevice: cuda:0 NVIDIA GeForce RTX 3060\nStarting server\n\nTo see the GUI go to: http://127.0.0.1:8188\n```\n\nAfter a run, the progress bar in KSampler completes, `got prompt`\n\nand `Prompt executed`\n\nappear in the terminal, and `output/`\n\ncontains a 512×512 image plus a 2048×2048 upscaled one.\n\n## Troubleshooting\n\n— you got CPU-only wheels (usually by running`AssertionError: Torch not compiled with CUDA enabled`\n\n`pip install -r requirements.txt`\n\nfirst). Fix:`pip uninstall torch torchvision torchaudio`\n\n, then reinstall with the`--extra-index-url https://download.pytorch.org/whl/cu130`\n\ncommand from step 1.— the model file is corrupt, usually an HTML login page saved as`safetensors_rust.SafetensorError: Error while deserializing header: HeaderTooLarge`\n\n`.safetensors`\n\n. Check`ls -lh`\n\n; if it's kilobytes, re-download using the`/resolve/`\n\nURL (not`/blob/`\n\n) or after logging in to Civitai.— your GPU ran out of VRAM mid-sample. Relaunch with`torch.OutOfMemoryError: CUDA out of memory`\n\n`python main.py --lowvram`\n\n, or drop Empty Latent Image back to 512×512.**Checkpoint dropdown shows**— the file is in the wrong folder or was added while the server was running. Confirm it's in`null`\n\n`models/checkpoints`\n\n(not a subfolder of your home dir) and press**R** to refresh.\n\n## Next steps\n\nInstall [ComfyUI-Manager](https://github.com/Comfy-Org/ComfyUI-Manager) (`git clone https://github.com/ltdrdata/ComfyUI-Manager`\n\ninside `custom_nodes/`\n\n, then restart) — it auto-installs missing custom nodes when you import someone else's workflow. From there, browse the built-in template library for SDXL and image-to-image graphs, work through the [official examples](https://docs.comfy.org/tutorials/basic/lora), and remember any PNG ComfyUI generates embeds its full workflow — drag one onto the canvas to reload it.\n\n## Sources & further reading\n\n-\n[Manual Installation - Local Self-Hosted](https://docs.comfy.org/installation/manual_install)— docs.comfy.org -\n[ComfyUI First Image Generation](https://docs.comfy.org/get_started/first_generation)— docs.comfy.org -\n[ComfyUI LoRA Example](https://docs.comfy.org/tutorials/basic/lora)— docs.comfy.org -\n[ComfyUI Image Upscale Example](https://docs.comfy.org/tutorials/basic/upscale)— docs.comfy.org -\n[ComfyUI README](https://github.com/comfyanonymous/ComfyUI)— github.com -\n[ComfyUI-Manager](https://github.com/Comfy-Org/ComfyUI-Manager)— github.com\n\n[Mariana Souza](https://sourcefeed.dev/u/mariana_souza)· Senior Editor\n\nMariana covers the fast-moving world of machine learning and generative AI, with a particular focus on how these technologies are reshaping development workflows. When she isn't stress-testing the latest foundation models, she's usually at a local hackathon.\n\n## Discussion 0\n\nNo comments yet\n\nBe the first to weigh in.", "url": "https://wpnews.pro/news/install-comfyui-and-build-your-first-stable-diffusion-workflow", "canonical_source": "https://sourcefeed.dev/a/install-comfyui-and-build-your-first-stable-diffusion-workflow", "published_at": "2026-08-24 11:38:38+00:00", "updated_at": "2026-08-24 11:42:55.804459+00:00", "lang": "en", "topics": ["generative-ai", "ai-tools", "ai-infrastructure"], "entities": ["ComfyUI", "Stable Diffusion 1.5", "Mariana Souza", "Sourcefeed", "PyTorch", "NVIDIA", "Hugging Face", "Civitai"], "alternates": {"html": "https://wpnews.pro/news/install-comfyui-and-build-your-first-stable-diffusion-workflow", "markdown": "https://wpnews.pro/news/install-comfyui-and-build-your-first-stable-diffusion-workflow.md", "text": "https://wpnews.pro/news/install-comfyui-and-build-your-first-stable-diffusion-workflow.txt", "jsonld": "https://wpnews.pro/news/install-comfyui-and-build-your-first-stable-diffusion-workflow.jsonld"}}