Preview Window
Navigate 9 preview views, interpret loss graphs, and recognize when your model has converged.
Overview
The training preview window provides real-time visual feedback on how your model is performing. It displays face images in various configurations so you can assess the quality of the face swap, mask accuracy, and overall convergence without waiting for a full merge.
The preview is arranged as a grid of face images and updates automatically as training progresses. Combined with the loss graph, the preview gives you a complete picture of training health.
Nine Preview Views
The preview cycles through 9 different views, each showing a different aspect of the training progress. You can navigate between views using keyboard shortcuts.
| View # | Label | What It Shows |
|---|---|---|
| 1 | src-src | Source face reconstructed from source input. Shows how well the model understands the source face. |
| 2 | dst-dst | Destination face reconstructed from destination input. Shows reconstruction quality for the target face. |
| 3 | pred | Source face mapped onto the destination. This is the actual face swap result -- the most important view. |
| 4 | warped src-src | Source face with random warping applied, then reconstructed. Tests the model's generalization ability. |
| 5 | warped dst-dst | Destination face with warping applied, then reconstructed. Verifies robustness to pose changes. |
| 6 | warped-pred | Warped source mapped onto destination. Shows how the swap handles varied poses and expressions. |
| 7 | mask src-src | The mask predicted for the source face. Should closely match the actual face boundary. |
| 8 | mask dst-dst | The mask predicted for the destination face. This mask is used during the merge step. |
| 9 | mask pred | The mask predicted for the swapped face. Clean, well-defined edges indicate good mask learning. |
Navigating Views
Use the following keyboard shortcuts to cycle through the 9 preview views:
| Shortcut | Action |
|---|---|
Space | Advance to the next preview view (1 → 2 → 3 ... → 9 → 1) |
Shift + Space | Go back to the previous preview view (3 → 2 → 1 ... → 9) |
Focus on Views 3 and 9
pred) shows the actual face swap result, and View 9 (mask pred) shows the predicted mask. These two views give you the most actionable information about training progress. Check them regularly while monitoring the loss graph.Understanding Each View
Reconstruction Views (1, 2, 4, 5)
These views show how well the model can reconstruct a face from its encoded representation. The model takes a face as input, encodes it into a compact representation, then decodes it back into an image.
- Early training -- Faces are blurry and lack detail. Colors may be off. This is normal.
- Mid training -- Faces become recognizable with correct proportions. Eyes, nose, and mouth are in the right positions but may lack fine detail.
- Late training -- Faces are sharp and detailed. Skin texture, eye reflections, and subtle expressions are preserved. The reconstruction closely matches the input.
Prediction Views (3, 6)
These are the face swap views -- the model takes the source face encoding and renders it using the destination face structure. View 3 is the standard prediction, and View 6 includes random warping for robustness testing.
- Good prediction -- The source person's identity is clearly visible, but the expression, lighting, and angle match the destination face. Skin color blends naturally.
- Poor prediction -- The face looks "ghostly" or distorted. Features from both source and destination bleed together. Colors are mismatched. This usually means more training is needed.
Mask Views (7, 8, 9)
Mask views show the predicted mask as a white-on-black image. The mask determines which pixels in the output are replaced with the swapped face and which are kept from the original.
- Good mask -- Clean, well-defined white area covering the face with smooth edges. The boundary follows the natural face contour.
- Poor mask -- Noisy or speckled mask with jagged edges. The boundary may cut through facial features or extend too far into the background.
Mask Quality Matters
Reading Loss Graphs
The loss graph appears above the preview in the training window. It plots loss values over iterations, with separate lines for source and destination losses.
Loss Lines
Blue Line: Source Loss
Measures how accurately the model reconstructs the source face. Lower values mean better reconstruction. This line typically decreases faster than destination loss.
Yellow Line: Destination Loss
Measures how accurately the model reconstructs the destination face. This loss directly affects the final output quality. It often converges more slowly than source loss.
Common Loss Patterns
Healthy Descent
Both lines steadily decrease with a steep initial drop that gradually flattens. Minor noise (small up/down fluctuations) is normal and expected. This pattern indicates the model is learning properly.
Plateau
Both lines flatten and show minimal change over thousands of iterations. This means the model has converged -- it has learned as much as it can from the current dataset and configuration. Further training provides diminishing returns.
Loss Spike
A sudden upward jump in one or both loss lines. Small, occasional spikes are normal and the model recovers. If a spike persists for more than a few hundred iterations, there may be a problem with the dataset (corrupted files, mixed-up faces).
Divergence
Loss steadily increases over time instead of decreasing. This is a serious problem, usually caused by an excessively high learning rate, a very small or corrupted dataset, or mismatched source/destination face types. Stop training and investigate.
Do Not Over-Train
Convergence Signs
Knowing when to stop training is as important as knowing how to start it. Look for these convergence indicators:
- Loss graph flattens -- Both source and destination loss curves have been flat for 5,000+ iterations with no meaningful decrease.
- Faces look natural -- View 3 (pred) shows a convincing face swap with correct skin color, natural expressions, and no visible artifacts.
- Masks are clean -- View 9 (mask pred) shows smooth, well-defined mask boundaries that follow the face contour accurately.
- Warped views are stable -- Views 4-6 (warped variants) show consistent quality under different random transformations, indicating the model generalizes well.
- Fine details are preserved -- Teeth, eye reflections, and skin texture are visible in the prediction views.
When in Doubt, Merge a Test
Preview Grid Layout
The training preview displays faces in a grid layout. Each view shows multiple sample faces from the training batch, arranged in a 4-column by 2-row grid. This allows you to see how the model performs on different face samples simultaneously.
The grid layout is optimized from DeepFaceLab's native 2-column by 4-row layout. Recaster automatically transforms the preview to the 4x2 layout for a more natural viewing experience on widescreen displays.
Live Preview for Remote Training
Troubleshooting
Preview is blank or not updating
Verify that training is actively running (check the iteration counter). The preview may take a few iterations to appear after starting training. If using remote training, check the SSH connection status.
Preview shows artifacts or glitches
This is normal in the first few hundred iterations while the model initializes. If artifacts persist after 1,000+ iterations, there may be a dataset quality issue. Check for corrupted images or misaligned faces.
View navigation not working
Make sure the preview canvas has keyboard focus. Click on the preview area first, then use Space / Shift+Space to navigate between views.
Preview not showing 4x2 grid
The layout transformation requires the cropped preview image to have a height at least 1.5 times its width. If the DFL preview header is not properly cropped, the image may not meet this ratio requirement. Restarting training usually resolves this.
Was this page helpful?