This guide walks you through the entire process of creating and using personas, from start to finish.
- Creating a Persona
- Preparing Training Data
- Training Your Persona
- Using Your Persona in ComfyUI
- Writing Effective Prompts
- Using Multiple Personas
- Troubleshooting
python scripts/persona_manager.py add --name "John Doe" --description "Professional man, 30s"This creates:
- Persona ID:
persona-john_doe - Trigger Word:
persona-john_doe(used in prompts) - Training Directory:
training_data/persona-john_doe/
python scripts/persona_manager.py add --name "John Doe" --trigger-word "johndoe_v1"# List all personas
python scripts/persona_manager.py list
# Get detailed info
python scripts/persona_manager.py info persona-john_doe- Quantity: 20-30 images minimum
- Quality: High resolution, clear face visibility
- Variety: Different angles, expressions, lighting
- Consistency: Same person in all images
Place your images in:
training_data/persona-john_doe/raw/
python scripts/prepare_training_data.py --persona-id persona-john_doeThis will:
- Resize images to 1024x1024
- Create caption files with trigger word
- Save processed images to
training_data/persona-john_doe/processed/
For better training results, generate descriptive captions using AI:
# Basic detailed captions
python scripts/generate_captions.py --persona-id persona-john_doe --mode detailed
# With quality modifiers
python scripts/generate_captions.py --persona-id persona-john_doe --mode detailed \
--suffix "professional photography, highly detailed"
# Generate multiple variations per image
python scripts/generate_captions.py --persona-id persona-john_doe --mode variationsCaption modes:
- simple: Just the trigger word (basic)
- detailed: AI-generated descriptions (recommended)
- variations: Multiple captions per image (advanced)
./scripts/train_lora.sh persona-john_doe# Custom learning rate and steps
./scripts/train_lora.sh persona-john_doe 1e-4 6000
# Parameters: persona-id learning-rate train-steps- Default (4000 steps): ~30-45 minutes on M4 Mac
- Extended (6000-8000 steps): ~45-70 minutes
Training saves checkpoints every 5 epochs in:
outputs/persona-john_doe_lora_[timestamp]/
./scripts/run_comfyui.shOpen http://localhost:8188 in your browser
- Generate workflow:
python persona_gen.py create-workflow --persona-id persona-john_doe --type image-
In ComfyUI:
- Click "Workflows" in the left sidebar
- Your persona workflows will appear in the list automatically
- Click on the workflow name to load it
- Or use "Load" → select from
workflows/directory - The workflow is pre-configured with your persona
-
Edit the positive prompt to include your trigger word:
"professional portrait of persona-john_doe, business suit, studio lighting"
- Click "Queue Prompt" to generate
-
Load any SDXL workflow
-
Add a "LoRA Loader" node:
- Right-click → Add Node → loaders → LoRA Loader
- Connect between Checkpoint Loader and KSampler
-
Configure LoRA Loader:
- Select
persona-john_doe.safetensors - strength_model: 0.8
- strength_clip: 0.8
- Select
-
Use trigger word in prompts
"[style] photo of persona-john_doe, [description], [environment], [lighting]"
"professional portrait of persona-john_doe, wearing business suit,
corporate headshot, studio lighting, shallow depth of field,
highly detailed, 8k resolution"
"candid photo of persona-john_doe, wearing casual t-shirt and jeans,
sitting in coffee shop, natural window lighting, relaxed expression,
bokeh background"
"dynamic photo of persona-john_doe giving presentation, conference room,
pointing at screen, business casual attire, confident expression,
cinematic lighting"
"oil painting style portrait of persona-john_doe, Renaissance lighting,
formal attire, dramatic shadows, masterpiece quality"
- Always include the trigger word exactly as shown
- Be specific about clothing, pose, expression
- Add quality modifiers: "highly detailed", "8k", "professional"
- Specify lighting: "studio lighting", "natural light", "golden hour"
- Include negative prompts: "blurry, low quality, distorted"
# Assuming you've trained both personas
python scripts/persona_manager.py generate-workflow \
persona-john_doe persona-jane_smith \
--prompt "business meeting" \
--output workflows/john_jane_meeting.json"professional photo of persona-john_doe and persona-jane_smith
shaking hands, modern office setting, business attire, natural lighting"
"group portrait, persona-john_doe on left wearing navy suit,
persona-jane_smith on right wearing red dress, corporate lobby background,
professional photography"
"cinematic shot, persona-john_doe presenting to persona-jane_smith,
conference room, projection screen showing charts, dynamic composition,
professional lighting"
- Check trigger word spelling - must be exact
- Verify training completed - check
models/loras/for the file - Increase LoRA strength - try 0.9 or 1.0
- Use simpler prompts - start with just the trigger word
- More training needed - train for 6000-8000 steps
- Better training data - ensure all images are the same person
- Reduce other descriptors - let the LoRA define appearance
- Reduce LoRA strengths - use 0.6-0.7 for each
- Use positioning - "on the left", "on the right"
- Add distinguishing features - clothing colors, accessories
- Add quality tags: "masterpiece", "best quality", "highly detailed"
- Specify resolution: "8k", "4k photography"
- Check negative prompt: Include "low quality, blurry, distorted"
- Adjust CFG scale: Try 7-9 for better adherence
# Create persona
python scripts/persona_manager.py add --name "Name Here"
# List personas
python scripts/persona_manager.py list
# Prepare data
python scripts/prepare_training_data.py --persona-id persona-name_here
# Train
./scripts/train_lora.sh persona-name_here
# Create workflow
python persona_gen.py create-workflow --persona-id persona-name_here
# Start ComfyUI
./scripts/run_comfyui.sh- Read Multi-Persona Guide for advanced techniques
- Check M4 Optimization Guide for performance tips
- See Example Usage for real-world scenarios