Reference images guide how realtime models transform your video. Lucy 2.1 uses them for character transformation — your face maps onto the reference identity. Lucy Restyle Live uses them for style guidance — the visual aesthetic of the reference carries into the output. This guide covers image requirements, best practices for character portraits, style references, and troubleshooting.Documentation Index
Fetch the complete documentation index at: https://docs.platform.decart.ai/llms.txt
Use this file to discover all available pages before exploring further.
How reference images work
- Lucy 2.1 — Character Reference
- Lucy Restyle Live — Style Reference
Upload a face photo and Lucy 2.1 maps your movements, expressions, and gestures onto that character in realtime. The reference image provides the visual identity — your camera provides the motion.
Image requirements
| Property | Requirement |
|---|---|
| Formats | JPEG, PNG, WebP |
| Minimum resolution | 512×512 pixels recommended |
| Maximum size | No hard limit, but keep under 5MB for fast uploads |
| Accepted input types | File, Blob, URL string |
Character reference best practices (Lucy 2.1)
The quality of the character transformation depends heavily on the reference image. Follow these guidelines for the best results:What works well
Clear, well-lit portraits
Front-facing photos with even lighting and a neutral background produce the most consistent transformations.
Head-and-shoulders framing
Cropped portraits with the face centered and clearly visible. Full-body shots reduce face detail.
Neutral expressions
Neutral or mildly expressive faces transfer better. Extreme expressions can conflict with your live movements.
High resolution
At least 512×512 pixels. Higher resolution captures more identity detail.
What to avoid
- Heavy occlusion — Images where the face is partially hidden by hands, hair, or objects reduce transformation quality
- Extreme angles — Profile shots or heavily tilted faces don’t transfer well to front-facing camera input
- Low resolution — Blurry or pixelated images lose identity details
- Multiple faces — The model picks one face, but results are unpredictable. Crop to a single face.
- Non-face images — Character reference expects a face. For non-face references, use Lucy Restyle Live’s style reference instead.
Switching characters
You can change the reference image at any time without reconnecting. The transition is near-instant:Combining with text prompts
Character reference and text prompts work together. The reference sets the identity; the prompt adds modifications:Style reference best practices (Lucy Restyle Live)
When using Lucy Restyle Live for style transfer, the reference image sets the overall visual aesthetic — colors, textures, artistic style, lighting.What works well
- Artworks and illustrations — Paintings, digital art, and stylized illustrations transfer their visual language effectively
- Strong visual identity — Images with distinct color palettes, textures, or lighting produce recognizable style transfers
- Clean compositions — Simple, focused images with a clear style are more effective than busy scenes
What to avoid
- Photos of real scenes — These often lack a distinctive “style” for the model to extract
- Very dark or very bright images — Extreme exposure can produce washed-out or muddy results
- Text-heavy images — The model may try to reproduce text elements, which usually looks wrong in video
Using style references
Managing reference images in your app
Image upload UI
Build a simple image picker that sends the file to the realtime client:Preset characters
Pre-load a gallery of character options that users can tap to transform:Clearing the reference
Remove the reference image to return to text-only editing:Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Character doesn’t resemble reference | Low-resolution or occluded face | Use a clear, high-res portrait (512×512+) |
| Transformation looks generic | Reference image too small or blurry | Crop to head-and-shoulders, ensure sharp focus |
| Flickering between original and transformed | Prompt and image updated separately | Use set() to update both atomically |
| Style reference not taking effect | Using Lucy Restyle Live with set() | Use setImage() for Lucy Restyle Live style references |
| Image upload fails | Unsupported format | Use JPEG, PNG, or WebP only |
| Slow image upload | Large file size | Resize to under 2048px on longest side before uploading |
Next steps
Lucy 2.1 Guide
Full Lucy 2.1 integration guide
Streaming Best Practices
Optimize your realtime integration
Use Cases
Explore what you can build with realtime models
JavaScript SDK
Full SDK reference for
set(), setImage(), and more