From 4165018ab2951fcb32adb4b0d0cd28c9d5828688 Mon Sep 17 00:00:00 2001 From: pplate Date: Sat, 4 Apr 2026 12:28:20 +0200 Subject: [PATCH] fix(mcp-image-gen): fix HuggingFace authenticated download instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FLUX.1-schnell is a gated model — bare wget returns HTTP 401. - Replace bare wget with huggingface-cli login + download (Option A) - Add wget with Authorization header as Option B - Add license acceptance prerequisite (huggingface.co gated repo) - Add token creation link (huggingface.co/settings/tokens) - Add fp8 quantized variant as alternative (~8.1GB, faster inference) - Add download size note (~8GB, 10-30min) --- mcp/mcp-image-gen/USAGE.md | 41 +++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/mcp/mcp-image-gen/USAGE.md b/mcp/mcp-image-gen/USAGE.md index 8bc29d3..2e139dc 100644 --- a/mcp/mcp-image-gen/USAGE.md +++ b/mcp/mcp-image-gen/USAGE.md @@ -53,17 +53,48 @@ pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6 FLUX.1-schnell is the recommended model — fast (4 steps), Apache 2.0 licensed, excellent quality. -```bash -# Download (~8GB) — place in ComfyUI/models/checkpoints/ -wget https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors \ - -O ~/ComfyUI/models/checkpoints/flux1-schnell.safetensors +> ⚠️ **FLUX.1-schnell is a gated model on HuggingFace.** +> A bare `wget` on the URL returns HTTP 401. You must: +> 1. Accept the license at https://huggingface.co/black-forest-labs/FLUX.1-schnell (click **"Agree and access repository"** — one-time) +> 2. Create a HuggingFace access token with **Read** permissions at https://huggingface.co/settings/tokens -# Or use huggingface_hub: +#### Option A — `huggingface-cli` (recommended) + +```bash +# Install the HuggingFace Hub CLI +pip install huggingface_hub + +# Log in — paste your Read token when prompted +huggingface-cli login + +# Download (~8GB) directly into ComfyUI checkpoints huggingface-cli download black-forest-labs/FLUX.1-schnell \ flux1-schnell.safetensors \ --local-dir ~/ComfyUI/models/checkpoints/ ``` +#### Option B — `wget` with Authorization header + +```bash +wget --header="Authorization: Bearer hf_YOUR_TOKEN_HERE" \ + https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors \ + -O ~/ComfyUI/models/checkpoints/flux1-schnell.safetensors +``` + +> Replace `hf_YOUR_TOKEN_HERE` with your actual HuggingFace token from https://huggingface.co/settings/tokens + +#### Alternative: fp8 quantized variant (~8.1GB, faster inference) + +If you want slightly faster inference with near-identical quality, the fp8 quantized version is also available: + +```bash +huggingface-cli download black-forest-labs/FLUX.1-schnell-fp8 \ + flux1-schnell-fp8.safetensors \ + --local-dir ~/ComfyUI/models/checkpoints/ +``` + +> **Download note:** Both variants are ~8GB — expect 10–30 minutes depending on connection speed. + You'll also need the CLIP and VAE models — see the [ComfyUI FLUX guide](https://github.com/comfyanonymous/ComfyUI/blob/master/README.md) for full model list. ### Start ComfyUI (AMD ROCm)