Maintained comprehensive documentation for future LoRA additions
v1.2 (2025-10-14)
Fixed YAML frontmatter positioning to meet Hugging Face standards
YAML frontmatter now starts at line 1 as required
Moved version comment to proper position after YAML section
Ensured full compliance with Hugging Face model card metadata requirements
v1.1 (2025-10-13)
Enhanced repository organization documentation
Added comprehensive LoRA training specifications
Expanded performance optimization guidelines
Improved multi-LoRA blending examples
Added detailed prompt engineering best practices
Updated hardware requirements with more granular specifications
Added troubleshooting section for common issues
Clarified precision compatibility across FP16/FP8 base models
v1.0 (2025-10-13)
Initial repository structure and README
Basic LoRA usage documentation
Integration examples with FLUX.1-dev base models
Model Description
This repository contains a collection of LoRA (Low-Rank Adaptation) adapters for FLUX.1-dev models, focused on specialized content generation. LoRA adapters provide efficient fine-tuning by adding small trainable parameters to the base model, enabling style variations, character customization, and domain-specific generation without modifying the original model weights.
Key Capabilities:
Efficient fine-tuning with minimal storage footprint (typically 10-500MB per LoRA)
Compatible with FLUX.1-dev base models (FP16, FP8, and quantized variants)
Stackable adapters for combining multiple styles/concepts
Fast loading and switching between different LoRAs
Preserves base model quality while adding specialized capabilities
Repository Contents
Directory Structure
flux-dev-loras-nsfw/
├── loras/
│ └── flux/
│ └── [LoRA model files will be stored here]
└── README.md (this file)
Model Files
Current Status: Repository structure initialized, awaiting model files.
Medium LoRAs: 50-200 MB (character/concept adapters)
Large LoRAs: 200-500 MB (complex multi-concept adapters)
Total Repository Size
Current: 22 KB (empty structure)
Expected: Varies based on LoRA collection (typically 100MB - 5GB total)
Hardware Requirements
For LoRA Usage with FLUX.1-dev
Minimum Requirements:
GPU: NVIDIA RTX 3060 (12GB VRAM) or equivalent
RAM: 16 GB system memory
Storage: 500 MB - 10 GB (depending on collection size)
VRAM Usage: Base model (11-13GB) + LoRA overhead (100-500MB)
Recommended Setup:
GPU: NVIDIA RTX 4090 (24GB VRAM) or A100
RAM: 32 GB system memory
Storage: 10-50 GB for comprehensive collection
VRAM: 16-20GB for comfortable multi-LoRA usage
LoRA-Specific Benefits:
Much lower VRAM overhead than full model fine-tunes
Can load/unload LoRAs dynamically without restarting
Multiple LoRAs can be combined with weighted blending
Usage Examples
Basic LoRA Loading (Diffusers)
python
1from diffusers import FluxPipeline
2import torch
34# Load base FLUX.1-dev model5pipe = FluxPipeline.from_pretrained(6"E:\\huggingface\\flux-dev-fp16",# Your local FLUX.1-dev path7 torch_dtype=torch.float16
8)9pipe.to("cuda")1011# Load LoRA adapter12pipe.load_lora_weights(13"E:\\huggingface\\flux-dev-loras-nsfw\\loras\\flux",14 weight_name="your_lora.safetensors",15 adapter_name="custom_style"16)1718# Generate with LoRA19prompt ="your prompt with trigger words"20image = pipe(21 prompt=prompt,22 num_inference_steps=30,23 guidance_scale=7.5,24 height=1024,25 width=102426).images[0]2728image.save("output.png")
Multi-LoRA Blending
python
1# Load multiple LoRAs2pipe.load_lora_weights(3"E:\\huggingface\\flux-dev-loras-nsfw\\loras\\flux",4 weight_name="style_lora.safetensors",5 adapter_name="style"6)7pipe.load_lora_weights(8"E:\\huggingface\\flux-dev-loras-nsfw\\loras\\flux",9 weight_name="character_lora.safetensors",10 adapter_name="character"11)1213# Set adapter weights for blending14pipe.set_adapters(["style","character"], adapter_weights=[0.8,0.6])1516# Generate with combined LoRAs17image = pipe(prompt="your combined prompt").images[0]
Dynamic LoRA Switching
python
1# Unload current LoRA2pipe.unload_lora_weights()34# Load different LoRA5pipe.load_lora_weights(6"E:\\huggingface\\flux-dev-loras-nsfw\\loras\\flux",7 weight_name="different_lora.safetensors"8)910# Generate with new style11image = pipe(prompt="new prompt").images[0]
Using with ComfyUI
1. Place LoRA files in: ComfyUI/models/loras/
2. In ComfyUI workflow:
- Add "Load LoRA" node
- Connect to your FLUX.1-dev model
- Set strength: 0.6-1.0 (adjust for desired effect)
- Add trigger words to your prompt
Model Specifications
LoRA Architecture
Format: SafeTensors (recommended for security and efficiency)
Rank: Varies by LoRA (typical range: 4-128)
Low rank (4-32): Lightweight style adapters
Medium rank (32-64): Balanced quality/size
High rank (64-128): Maximum quality, larger files
Precision Options:
FP16: Standard precision for most use cases
FP32: Higher precision for professional workflows
Quantized: Experimental lower-precision variants
Base Model Compatibility:
FLUX.1-dev (primary)
FLUX.1-schnell (compatible with adjustments)
Works with FP16, FP8, and quantized base models
Training Specifications
LoRAs in this collection are typically trained with:
Training steps: 500-5000 (varies by complexity)
Learning rate: 1e-4 to 1e-5
Batch size: 1-4
Base model: FLUX.1-dev
Dataset: Specialized domain-specific images
Performance Tips
LoRA Loading Optimization
Fast Switching:
python
1# Keep base model loaded, only swap LoRAs2pipe.unload_lora_weights()# Fast3pipe.load_lora_weights(...)# Fast4# Much faster than reloading entire base model
Memory Management:
Load only needed LoRAs to minimize VRAM usage
Use pipe.unload_lora_weights() when switching styles
Consider LoRA weight caching for frequently used adapters
Weight Adjustment:
Start with LoRA strength 0.7-1.0
Lower weights (0.3-0.6) for subtle effects
Higher weights (1.0-1.5) for strong style enforcement
Test different weights to find optimal balance
Multi-LoRA Best Practices
Combining LoRAs:
Limit to 2-3 LoRAs simultaneously for stability
Adjust individual weights to balance effects
Test combinations individually before stacking
Monitor VRAM usage when loading multiple adapters
Prompt Engineering with LoRAs:
Include trigger words specific to each LoRA
Place important trigger words early in prompt
Use emphasis syntax: (trigger word:1.2) for stronger effect
Avoid conflicting concepts between multiple LoRAs
Advanced Prompt Engineering
Trigger Word Strategies:
python
1# Basic trigger word usage2prompt ="anime style, portrait of a character"# Generic34# Optimized with LoRA trigger words5prompt ="anime_style_v2, detailed portrait, character design"# LoRA-specific
Commercial use requires license from Black Forest Labs
Usage Restrictions:
Respect individual LoRA creator licenses
NSFW content: Ensure compliance with local laws and platform policies
Attribution required for derivative works
No redistribution without permission from LoRA creators
Citation
FLUX.1 Base Model
bibtex
1@article{flux2024,
2 title={FLUX.1: A New Generation of Diffusion Models},
3 author={Black Forest Labs},
4 journal={Technical Report},
5 year={2024},
6 url={https://blackforestlabs.ai/flux-1}
7}
LoRA Methodology
bibtex
1@article{hu2021lora,
2 title={LoRA: Low-Rank Adaptation of Large Language Models},
3 author={Hu, Edward J and Shen, Yelong and Wallis, Phillip and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Shean and Wang, Lu and Chen, Weizhu},
4 journal={arXiv preprint arXiv:2106.09685},
5 year={2021}
6}