feat: add comprehensive negative embeddings support (SD 1.5, SDXL, Pony)

- Add 3 new embedding categories to models_civitai.yaml:
  - embeddings_sd15: 6 embeddings (BadDream, UnrealisticDream, badhandv4, EasyNegative, FastNegativeV2, BadNegAnatomyV1-neg)
  - embeddings_sdxl: 1 embedding (BadX v1.1)
  - embeddings_pony: 2 embeddings (zPDXL3, zPDXLxxx)
- Total storage: ~1.1 MB (9 embeddings)
- Add comprehensive embeddings documentation to NSFW README
- Include usage examples, compatibility notes, and syntax guide
- Document embedding weights and recommended combinations
This commit is contained in:
2025-11-23 19:39:18 +01:00
parent 68d3606cab
commit 5770563d9a
2 changed files with 236 additions and 0 deletions

View File

@@ -260,6 +260,98 @@ Use `nsfw-ultimate-upscale-production-v1.json` for professional 2x upscaling wit
### Style Transfer:
Use IP-Adapter workflows in `../image-to-image/` directory to combine with style references.
## Using Negative Embeddings
Negative embeddings (textual inversions) are small trained models that significantly improve image quality when used in negative prompts. They help avoid common artifacts like bad anatomy, unrealistic features, and low-quality outputs.
### Available Embeddings
**For SDXL Models (LUSTIFY, RealVisXL):**
- `BadX` - Fixes facial/hand artifacts, improves overall realism
**For Pony/WAI-Illustrious Models:**
- `zPDXL3` - Quality enhancement + removes censoring
- `zPDXLxxx` - Enables explicit NSFW content
**For SD 1.5 Models (future workflows):**
- `BadDream` + `UnrealisticDream` - Dreamshaper artifacts + realism
- `badhandv4` - Improves hand details
- `FastNegativeV2` - General quality enhancement
- `BadNegAnatomyV1-neg` - Better anatomy and body joints
- `easynegative` - General-purpose quality
### Installation
Embeddings are automatically downloaded and linked to `/workspace/ComfyUI/models/embeddings/` when you run:
```bash
cd /workspace/ai && bash /workspace/bin/artifact_civitai_download.sh both -c models_civitai.yaml
```
### Usage Syntax
**Basic usage in negative prompt:**
```
embedding:BadX
embedding:zPDXL3
```
**Multiple embeddings:**
```
embedding:zPDXL3, embedding:zPDXLxxx, score_4, score_5, low quality
```
**With weight adjustment:**
```
(embedding:zPDXL3:1.5), (embedding:BadX.pt:1.2), ugly, deformed
```
**Note:** When using weights, include the full filename with extension (.pt or .safetensors).
### Recommended Usage by Workflow
**LUSTIFY Realistic T2I:**
```
Negative: embedding:BadX, (worst quality, low quality:1.4), bad anatomy, deformed, blurry, watermark, text
```
**RealVisXL Lightning T2I:**
```
Negative: embedding:BadX, (worst quality, low quality:1.4), ugly, cartoon, anime
```
**Pony Anime / WAI-Illustrious T2I:**
```
Negative: embedding:zPDXL3, embedding:zPDXLxxx, score_4, score_5, score_6, bad anatomy, deformed
```
Or with custom strength:
```
Negative: (embedding:zPDXL3:1.5), (embedding:zPDXLxxx:1.2), score_4, score_5, low quality
```
**NSFW Ultimate SD Upscale:**
```
Negative: embedding:BadX, (worst quality, low quality:1.4), blurry, pixelated, jpeg artifacts
```
### Important Compatibility Notes
**CRITICAL:** SD 1.5 embeddings (BadDream, badhandv4, etc.) DO NOT work with SDXL models due to different CLIP architectures. Always use:
- **SDXL models** → `BadX` embedding
- **Pony models** → `zPDXL3` and `zPDXLxxx` embeddings
- **SD 1.5 models** → SD 1.5 embeddings only
Using the wrong embedding type will cause errors or unexpected results.
### Tips
- Start with recommended strength 1.0-2.0 for Pony embeddings
- `zPDXL3` removes censoring, ideal for NSFW Pony workflows
- Combine multiple embeddings for best results
- `BadX` works with all general SDXL checkpoints (LUSTIFY, RealVisXL, etc.)
- Higher CFG scales (≥11) work better with `badhandv4` (SD 1.5)
## Notes
- All workflows follow production naming standards