The Right GPT

How To, Unbiased Guides, Prompts & Reviews for AI Tools


Stable Diffusion Linux Installation Guide 2026: Automatic1111, ComfyUI & WebUI

Stable Diffusion Linux Install 2026: A1111, ComfyUI, Flags & Fixes

πŸ”₯ Stable Diffusion Linux Installation Guide 2026: A1111, ComfyUI & WebUI

Step-by-step guide to install Stable Diffusion on Linux in 2026. Covers Automatic1111 WebUI, ComfyUI setup, Python 3.10.6 requirements, VRAM flags (–lowvram, –medvram), AMD ROCm support, and fixes for the conv3d memory bug & ComfyUI-Manager errors.

🐍

Python 3.10.6

Required for A1111 & ComfyUI in 2026

⚑

–medvram / –lowvram

Essential VRAM flags for 4-12GB GPUs

πŸ”„

–opt-sdp-attention

Replace xformers on newer Linux kernels

🐧

AMD ROCm Support

RX 6000/7000 series with ROCm 6.2+

πŸ“Œ Not Using Linux?

We have optimized guides for other platforms:

πŸ“Š Best Way to Install Stable Diffusion Locally in 2026

UI/Framework Best For Difficulty VRAM Flags Python Version
Automatic1111 WebUI Beginners, Most Features, Extensions Easy-Medium --medvram, --lowvram 3.10.6
ComfyUI Advanced Workflows, Best Performance, Flux/SD3.5 Medium-Hard --lowvram, --medvram, --highvram 3.10.6
Forge Performance, SD 3.5, Flux.1 Support Medium --medvram, --lowvram 3.10.6
SwarmUI Latest Features, Multi-Backend Hard Varies by backend 3.10+

🐍 Python Version Requirements 2026

Critical: Based on 2026 search data, Python version mismatch is the #1 cause of installation failures.

AUTOMATIC1111 Python 3.10.6 (strict)
ComfyUI Python 3.10.6 recommended
Forge Python 3.10.6
Avoid Python 3.11, 3.12
πŸ”§ Install Python 3.10.6 on Ubuntu/Debian
# Add deadsnakes PPA sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update # Install Python 3.10 and virtual environment sudo apt install python3.10 python3.10-venv python3.10-dev # Create and activate virtual environment python3.10 -m venv sd-env source sd-env/bin/activate
πŸ”§ Install Python 3.10.6 on Arch/Manjaro
# Install Python 3.10 sudo pacman -S python310 # Create virtual environment python3.10 -m venv comfyui-env source comfyui-env/bin/activate

⚑ ComfyUI Command Line Flags 2026: –lowvram, –medvram, –use-sdp

Top searched flags based on 2026 query data. Use the correct flag for your GPU VRAM:

–lowvram

For 4-6GB VRAM (RTX 3050, 3060, older GPUs)

4-6 GB
python main.py –lowvram –opt-sdp-attention

–medvram

For 6-12GB VRAM (RTX 3060 Ti, 3070, 4060)

6-12 GB
python main.py –medvram –opt-sdp-attention

–highvram

For 12GB+ VRAM (RTX 3080, 3090, 4090)

12GB+
python main.py –highvram –use-sdp-attention

πŸ“Œ Key Flags Explained (2026 Update)

  • --opt-sdp-attention β†’ Use for lower VRAM (4-12GB). Optimized attention.
  • --use-sdp-attention β†’ Use for 12GB+ VRAM. Faster but more memory.
  • --disable-cuda-malloc β†’ Fix for “working around nvidia conv3d memory bug”.

πŸ› οΈ Fix: “Working around nvidia conv3d memory bug”

⚠️ Common Error (12+ searches in 7 days)

working around nvidia conv3d memory bug appears in console, causes VRAM leaks and crashes.

βœ… Immediate Workaround

python main.py –disable-cuda-malloc –medvram

βœ… Permanent Fix: Update NVIDIA Drivers

# Check current driver nvidia-smi # Ubuntu/Debian – Install latest stable sudo apt update sudo apt install nvidia-driver-550 # or 535/545 # Arch/Manjaro sudo pacman -S nvidia nvidia-utils # Reboot after driver update sudo reboot

βœ… Alternative: Use FP16 Precision

python main.py –fp16 –medvram –opt-sdp-attention

πŸ”§ Fix: “[comfyui-manager] installation failed: ignored”

⚠️ Common Manager Error

ComfyUI Manager fails to install or update custom nodes.

βœ… Step 1: Manual Installation

cd ComfyUI/custom_nodes git clone https://github.com/ltdrdata/ComfyUI-Manager.git cd ComfyUI-Manager pip install -r requirements.txt

βœ… Step 2: Clear Cache & Permissions

# Clear manager cache rm -rf ~/.cache/comfyui-manager rm -rf /tmp/comfyui-manager # Fix permissions sudo chown -R $USER:$USER ~/ComfyUI/ chmod -R 755 ~/ComfyUI/custom_nodes/

βœ… Step 3: Manual Node Installation (If Manager Still Fails)

cd ComfyUI/custom_nodes git clone [NODE_REPOSITORY_URL] cd [NODE_FOLDER_NAME] pip install -r requirements.txt

πŸ“¦ Fix: “stability-ai/stablediffusion repository not found”

⚠️ 404 Error – Repository Moved/Renamed

Old Stability AI repositories are being reorganized in 2026.

βœ… Solution 1: Use Hugging Face Mirrors

# Download models directly from Hugging Face cd ComfyUI/models/checkpoints wget https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors

βœ… Solution 2: Use SSH Instead of HTTPS

# Generate SSH key (if needed) ssh-keygen -t ed25519 -C “your_email@example.com” cat ~/.ssh/id_ed25519.pub # Add to GitHub # Clone with SSH git clone git@github.com:stability-ai/stablediffusion.git

πŸŸ₯ AMD GPU Linux Support (ROCm 6.2+)

Install ROCm on Ubuntu 24.04
# Install ROCm sudo apt update sudo apt install rocm-hip-sdk rocm-opencl-sdk # Add user to video group sudo usermod -a -G video $USER # Install PyTorch with ROCm pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.2 # Launch ComfyUI with ROCm python main.py --use-rocm --medvram
ROCm Version 6.2+ recommended
Supported GPUs RX 6000/7000 series
Performance 30-50% slower than NVIDIA
Missing xformers (use –opt-sdp-attention)

πŸ” Quick Diagnostic Commands

Check Your System
# 1. Check GPU nvidia-smi # or rocminfo for AMD # 2. Check Python and PyTorch python -c "import torch; print(f'PyTorch: {torch.__version__}'); print(f'CUDA: {torch.cuda.is_available()}')" # 3. Check VRAM python -c "import torch; print(f'VRAM: {torch.cuda.get_device_properties(0).total_memory / 1e9:.2f} GB')"

❓ Frequently Asked Questions (Based on 2026 Searches)

Q: What Python version for A1111 in 2026?

A: Python 3.10.6 is required. Python 3.11+ will fail with xformers and torch compatibility issues.

Q: How do I use –medvram flag in ComfyUI?

A: Add --medvram when launching: python main.py --medvram --opt-sdp-attention. Use for 6-12GB GPUs.

Q: What’s the difference between –opt-sdp-attention and –use-sdp-attention?

A: --opt-sdp-attention is optimized for lower VRAM (4-12GB). --use-sdp-attention is faster but uses more memory (12GB+).

Q: Why is Stability AI repository not found?

A: Old repositories have been reorganized. Use Hugging Face mirrors or SSH cloning instead of HTTPS.

Q: How to install Stable Diffusion on Linux in 2026?

A: Use this guide! Install Python 3.10.6, clone A1111 or ComfyUI, use --medvram if needed, and follow the steps above.

Step-by-step guide to install Stable Diffusion on Linux in 2026. Covers Automatic1111 WebUI, ComfyUI setup, Python version requirements, VRAM flags (--lowvram, --medvram), and troubleshooting common errors. Complete Linux installation tutorial.

Running Stable Diffusion locally on Linux in 2026 is easier than everβ€”but Python mismatches, Torch errors, AMD GPU confusion, and low VRAM limitations still trip people up. This guide covers AUTOMATIC1111 (A1111) and ComfyUI, with fixes that actually work today. Here’s a practical, up-to-date (as of early 2026) guide to running Stable Diffusion locally on Linux.

Best way to install Stable Diffusion Locally 2026

Add this table after introduction:

UI/FrameworkBest ForDifficultyVRAM FlagsPython Version
Automatic1111 WebUIBeginners, Most FeaturesEasy-Medium--medvram --lowvram3.10+
ComfyUIWorkflows, Advanced UsersMedium-Hard--lowvram --medvram3.10+
ForgePerformance, SD 3.0MediumVaries3.10+
SwarmUILatest FeaturesHardVaries3.10+