feat: add dedicated CivitAI NSFW model downloader
- Add models_civitai.yaml with 6 NSFW SDXL checkpoints - Create artifact_civitai_download.sh with beautiful purple/magenta CLI - Update .env.example with CIVITAI_API_KEY documentation - Update CLAUDE.md with CivitAI usage instructions - Rename comfyui_models.yaml to models_huggingface.yaml for clarity Features: - Dedicated config and downloader for CivitAI models - Same elegant architecture as HuggingFace downloader - Retry logic, rate limiting, progress bars - Models: LUSTIFY, Pony Diffusion V6, RealVisXL, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
23
.env.example
23
.env.example
@@ -15,10 +15,33 @@ HF_TOKEN=hf_your_token_here
|
||||
# Get it with: tailscale ip -4
|
||||
# GPU_TAILSCALE_IP=100.100.108.13
|
||||
|
||||
# ============================================================================
|
||||
# CivitAI API Key (Optional, for NSFW models)
|
||||
# ============================================================================
|
||||
# Get your API key from: https://civitai.com/user/account
|
||||
# Required for downloading NSFW models with artifact_civitai_download.sh
|
||||
# CIVITAI_API_KEY=your_civitai_api_key_here
|
||||
|
||||
# ============================================================================
|
||||
# Tailscale VPN (Optional, for remote access)
|
||||
# ============================================================================
|
||||
# Get your authkey from: https://login.tailscale.com/admin/settings/keys
|
||||
# TAILSCALE_AUTHKEY=tskey-auth-your_tailscale_authkey_here
|
||||
|
||||
# ============================================================================
|
||||
# WebDAV Sync (Optional, for output synchronization)
|
||||
# ============================================================================
|
||||
# WebDAV credentials for syncing ComfyUI outputs to cloud storage
|
||||
# WEBDAV_URL=https://webdav.example.com/
|
||||
# WEBDAV_USERNAME=your_username
|
||||
# WEBDAV_PASSWORD=your_password
|
||||
# WEBDAV_REMOTE_PATH=/path/to/comfyui/outputs
|
||||
|
||||
# ============================================================================
|
||||
# Notes
|
||||
# ============================================================================
|
||||
# - HF_TOKEN is the only required variable for basic operation
|
||||
# - CIVITAI_API_KEY is required for downloading NSFW models from CivitAI
|
||||
# - Models will be cached in /workspace/ directories on RunPod
|
||||
# - Orchestrator automatically manages model switching
|
||||
# - No database credentials needed (stateless architecture)
|
||||
|
||||
73
CLAUDE.md
73
CLAUDE.md
@@ -288,6 +288,79 @@ environment=HF_HOME="../huggingface_cache",HF_TOKEN="%(ENV_HF_TOKEN)s"
|
||||
supervisorctl start vllm-mistral
|
||||
```
|
||||
|
||||
### Downloading NSFW Models from CivitAI
|
||||
|
||||
The project includes dedicated tooling for downloading NSFW models from CivitAI, separate from the HuggingFace downloader.
|
||||
|
||||
**Files:**
|
||||
- Configuration: `models_civitai.yaml` - Defines available CivitAI models
|
||||
- Downloader: `artifact_civitai_download.sh` - Beautiful CLI tool for downloading models
|
||||
|
||||
**Requirements:**
|
||||
- CivitAI API key (set in `.env` file as `CIVITAI_API_KEY`)
|
||||
- Get your key from: https://civitai.com/user/account
|
||||
|
||||
**Available Models (Essential):**
|
||||
1. **LUSTIFY v7.0 GGWP** (6.31GB) - Photoreal NSFW checkpoint for women
|
||||
2. **Pony Diffusion V6 XL** (6.5GB) - Anime/furry NSFW with balanced content
|
||||
3. **RealVisXL V5.0** (6.8GB) - Photorealistic NSFW model
|
||||
|
||||
**Usage:**
|
||||
|
||||
```bash
|
||||
# Download all essential NSFW models (19.61GB)
|
||||
artifact_civitai_download.sh
|
||||
|
||||
# Download only (no symlinks)
|
||||
artifact_civitai_download.sh download
|
||||
|
||||
# Create symlinks only (models already downloaded)
|
||||
artifact_civitai_download.sh link
|
||||
|
||||
# Custom configuration file
|
||||
artifact_civitai_download.sh -c /path/to/models_civitai.yaml
|
||||
|
||||
# Help
|
||||
artifact_civitai_download.sh --help
|
||||
```
|
||||
|
||||
**Directory Structure:**
|
||||
- Models downloaded to: `/workspace/models/civitai/` (cache)
|
||||
- Symlinks created in: `/workspace/ComfyUI/models/checkpoints/`
|
||||
|
||||
**Features:**
|
||||
- Beautiful purple/magenta themed CLI (vs cyan for HuggingFace)
|
||||
- Automatic retry with exponential backoff for rate limiting
|
||||
- Resume interrupted downloads
|
||||
- Progress bars and status indicators
|
||||
- Parallel download support (respects rate limits)
|
||||
|
||||
**Configuration Example (`models_civitai.yaml`):**
|
||||
|
||||
```yaml
|
||||
model_categories:
|
||||
nsfw_checkpoints:
|
||||
- name: lustify-v7-ggwp
|
||||
version_id: "1094291"
|
||||
model_id: "573152"
|
||||
description: "LUSTIFY v7.0 GGWP - Photoreal NSFW checkpoint"
|
||||
size_gb: 6.31
|
||||
essential: true
|
||||
type: checkpoints
|
||||
```
|
||||
|
||||
**Installation Profiles:**
|
||||
- `essential`: 3 models (LUSTIFY, Pony, RealVisXL) - 19.61GB, 30-60 min
|
||||
- `complete`: All 6 models - 39.21GB, 1-2 hours
|
||||
- `realistic_only`: LUSTIFY + RealVisXL - 13.11GB, 20-40 min
|
||||
- `anime_only`: Pony + WAI-NSFW - 13.0GB, 20-40 min
|
||||
|
||||
**Important Notes:**
|
||||
- All models are SDXL-based (require ~12GB VRAM)
|
||||
- Cannot run simultaneously with FLUX models (both use ~23GB)
|
||||
- Can run with smaller models like standard SDXL (~12GB total)
|
||||
- Rate limiting: 5 second delay between downloads (configurable)
|
||||
|
||||
## Key Implementation Details
|
||||
|
||||
### Direct vLLM Server Architecture
|
||||
|
||||
206
models_civitai.yaml
Normal file
206
models_civitai.yaml
Normal file
@@ -0,0 +1,206 @@
|
||||
# ============================================================================
|
||||
# CivitAI Model Configuration
|
||||
# ============================================================================
|
||||
#
|
||||
# This configuration file defines all available CivitAI models for download.
|
||||
# Models are organized by category: NSFW checkpoints, LoRAs, embeddings, etc.
|
||||
#
|
||||
# Each model entry contains:
|
||||
# - name: Filesystem-friendly model name
|
||||
# - version_id: CivitAI version ID (used for downloads)
|
||||
# - model_id: CivitAI model ID (used for metadata queries)
|
||||
# - description: Human-readable description
|
||||
# - size_gb: Approximate size in gigabytes
|
||||
# - essential: Whether this is an essential model (true/false)
|
||||
# - type: Model type (checkpoints, loras, embeddings, etc.)
|
||||
# - tags: Array of descriptive tags
|
||||
#
|
||||
# ============================================================================
|
||||
|
||||
# Global settings
|
||||
settings:
|
||||
cache_dir: /workspace/models/civitai
|
||||
output_dir: /workspace/ComfyUI/models
|
||||
parallel_downloads: 1
|
||||
retry_attempts: 3
|
||||
timeout_seconds: 3600
|
||||
rate_limit_delay: 5 # seconds between downloads
|
||||
|
||||
# Model categories
|
||||
model_categories:
|
||||
# ==========================================================================
|
||||
# NSFW IMAGE GENERATION MODELS
|
||||
# ==========================================================================
|
||||
nsfw_checkpoints:
|
||||
- name: lustify-v7-ggwp
|
||||
version_id: "1094291"
|
||||
model_id: "573152"
|
||||
description: "LUSTIFY v7.0 GGWP - Photoreal NSFW checkpoint for women in sexual scenarios"
|
||||
size_gb: 6.31
|
||||
essential: true
|
||||
type: checkpoints
|
||||
format: safetensors
|
||||
base_model: SDXL 1.0
|
||||
vram_gb: 12
|
||||
tags: [nsfw, realistic, photography, women]
|
||||
recommended_settings:
|
||||
sampler: "DPM++ 2M SDE / DPM++ 3M SDE"
|
||||
scheduler: "Exponential / Karras"
|
||||
steps: 30
|
||||
cfg_scale: "4-7"
|
||||
notes: "Understands both danbooru tags and natural language prompting"
|
||||
|
||||
- name: pony-diffusion-v6-xl
|
||||
version_id: "135867"
|
||||
model_id: "257749"
|
||||
description: "Pony Diffusion V6 XL - Versatile anime/cartoon/furry model with balanced content"
|
||||
size_gb: 6.5
|
||||
essential: true
|
||||
type: checkpoints
|
||||
format: safetensors
|
||||
base_model: SDXL 1.0
|
||||
vram_gb: 12
|
||||
tags: [nsfw, anime, furry, cartoon, versatile]
|
||||
training_info:
|
||||
images: "2.6M aesthetically ranked"
|
||||
ratio: "1:1:1 safe/questionable/explicit"
|
||||
notes: "Most popular anime/furry model on CivitAI, supports wide range of styles"
|
||||
|
||||
- name: realvisxl-v5
|
||||
version_id: "904692"
|
||||
model_id: "139562"
|
||||
description: "RealVisXL V5.0 - Photorealistic model for high-quality realistic images"
|
||||
size_gb: 6.8
|
||||
essential: true
|
||||
type: checkpoints
|
||||
format: safetensors
|
||||
base_model: SDXL 1.0
|
||||
vram_gb: 12
|
||||
tags: [nsfw, realistic, photorealistic, professional]
|
||||
recommended_settings:
|
||||
sampler: "DPM++ SDE Karras (30+ steps) or DPM++ 2M Karras (50+ steps)"
|
||||
notes: "Excellent for photorealistic portraits and scenes, both SFW and NSFW"
|
||||
|
||||
- name: wai-nsfw-illustrious-sdxl
|
||||
version_id: "1239648"
|
||||
model_id: "827184"
|
||||
description: "WAI-NSFW-illustrious-SDXL v15.0 - Actively updated NSFW Illustrious variant"
|
||||
size_gb: 6.5
|
||||
essential: false
|
||||
type: checkpoints
|
||||
format: safetensors
|
||||
base_model: SDXL 1.0
|
||||
vram_gb: 12
|
||||
tags: [nsfw, anime, illustrious, artistic]
|
||||
notes: "Latest version from October 2025, frequently updated"
|
||||
|
||||
- name: talmendoxl
|
||||
version_id: "131869"
|
||||
model_id: "119202"
|
||||
description: "TalmendoXL - Uncensored SDXL model biased towards photorealism"
|
||||
size_gb: 6.6
|
||||
essential: false
|
||||
type: checkpoints
|
||||
format: safetensors
|
||||
base_model: SDXL 1.0
|
||||
vram_gb: 12
|
||||
tags: [nsfw, realistic, uncensored, photorealistic]
|
||||
notes: "Known for high-quality photorealistic NSFW content"
|
||||
|
||||
- name: big-lust-v1-6
|
||||
version_id: "649023"
|
||||
model_id: "575395"
|
||||
description: "Big Lust v1.6 - SDXL NSFW checkpoint"
|
||||
size_gb: 6.5
|
||||
essential: false
|
||||
type: checkpoints
|
||||
format: safetensors
|
||||
base_model: SDXL 1.0
|
||||
vram_gb: 12
|
||||
tags: [nsfw, versatile]
|
||||
notes: "General-purpose NSFW model with good results across styles"
|
||||
|
||||
# ============================================================================
|
||||
# STORAGE & VRAM SUMMARIES
|
||||
# ============================================================================
|
||||
|
||||
storage_requirements:
|
||||
essential_only:
|
||||
nsfw_checkpoints: 19.61 # LUSTIFY + Pony + RealVisXL
|
||||
total: 19.61
|
||||
|
||||
all_models:
|
||||
nsfw_checkpoints: 39.21 # All 6 checkpoints
|
||||
total: 39.21
|
||||
|
||||
vram_requirements:
|
||||
# For 24GB GPU (RTX 4090)
|
||||
notes: |
|
||||
All SDXL checkpoints require approximately 12GB VRAM.
|
||||
Can run one checkpoint at a time on 24GB GPU.
|
||||
For simultaneous loading with other models (ComfyUI, vLLM),
|
||||
ensure combined VRAM usage stays under 24GB.
|
||||
|
||||
# ============================================================================
|
||||
# INSTALLATION PROFILES
|
||||
# ============================================================================
|
||||
|
||||
installation_profiles:
|
||||
essential:
|
||||
description: Essential NSFW models only (3 checkpoints)
|
||||
categories: [nsfw_checkpoints]
|
||||
essential_only: true
|
||||
storage_gb: 19.61
|
||||
estimated_time: "30-60 minutes"
|
||||
models:
|
||||
- lustify-v7-ggwp
|
||||
- pony-diffusion-v6-xl
|
||||
- realvisxl-v5
|
||||
|
||||
complete:
|
||||
description: All NSFW models (6 checkpoints)
|
||||
categories: [nsfw_checkpoints]
|
||||
storage_gb: 39.21
|
||||
estimated_time: "1-2 hours"
|
||||
models:
|
||||
- lustify-v7-ggwp
|
||||
- pony-diffusion-v6-xl
|
||||
- realvisxl-v5
|
||||
- wai-nsfw-illustrious-sdxl
|
||||
- talmendoxl
|
||||
- big-lust-v1-6
|
||||
|
||||
realistic_only:
|
||||
description: Photorealistic NSFW models only
|
||||
categories: [nsfw_checkpoints]
|
||||
storage_gb: 13.11
|
||||
estimated_time: "20-40 minutes"
|
||||
models:
|
||||
- lustify-v7-ggwp
|
||||
- realvisxl-v5
|
||||
|
||||
anime_only:
|
||||
description: Anime/cartoon NSFW models only
|
||||
categories: [nsfw_checkpoints]
|
||||
storage_gb: 13.0
|
||||
estimated_time: "20-40 minutes"
|
||||
models:
|
||||
- pony-diffusion-v6-xl
|
||||
- wai-nsfw-illustrious-sdxl
|
||||
|
||||
# ============================================================================
|
||||
# METADATA
|
||||
# ============================================================================
|
||||
|
||||
metadata:
|
||||
version: 1.0.0
|
||||
last_updated: 2025-11-23
|
||||
compatible_with:
|
||||
- ComfyUI >= 0.1.0
|
||||
- SDXL base models
|
||||
maintainer: Valknar
|
||||
repository: https://github.com/valknar/runpod
|
||||
notes: |
|
||||
All models listed are NSFW (adult content) and hosted on CivitAI.
|
||||
Requires CIVITAI_API_KEY for downloads.
|
||||
Models will be downloaded to cache_dir and symlinked to ComfyUI.
|
||||
Reference in New Issue
Block a user