> For the complete documentation index, see [llms.txt](https://docs.trendswap.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trendswap.app/core-engine/identity-preservation-protocol.md).

# identity preservation protocol

The defining innovation of TrendSwap is our **Zero Identity Distortion Red Line**.

Historically, early generative models suffered from “actor bleeding” or “facial averaging” — where the generated face resembled a strange composite of the user and the original actor in the reference video. TrendSwap's protocol completely eliminates this issue.

***

## The Three Golden Rules

### Rule 1: Negative Conditioning on Reference Video (`@Video 1`)

The neural conditioning pipeline explicitly isolates `@Video 1`:

* **Allowed Attributes**: Movement trajectory, choreography tempo, camera angle, and scene lighting.
* **Strictly Prohibited Attributes**: Facial contours, eye shape, nose bridge, lip color, skin tone, bone structure, and facial expressions of actors in `@Video 1`.
* Any gradient backpropagation attempting to blend reference actor identity into the output latents is penalized via negative guidance tensors.

### Rule 2: 100% Exclusive Identity Binding on User Portrait (`@Image 1`)

The actor in the final output must derive 100% of their anatomical and facial identity from `@Image 1`.

* The subject's ethnic identity, age characteristics, and distinct facial traits are fully preserved.
* The system prohibits smoothing away distinctive user features in favor of generic aesthetic templates.

### Rule 3: Multi-Character Isolation (No Identity Crosstalk)

In templates featuring two characters (e.g. *Smalltown Boy* or *Zombie Couple*):

* Slot 1 (`@Image 1`) is bound exclusively to Character A.
* Slot 2 (`@Image 2`) is bound exclusively to Character B.
* Independent spatial masks prevent identity attributes from leaking or swapping between participants.

***

## Comparison: TrendSwap vs. Legacy Approaches

| Dimension                 | Legacy AI Tools                                 | TrendSwap Identity Preservation               |
| ------------------------- | ----------------------------------------------- | --------------------------------------------- |
| **Facial Likeness**       | 60%–70% (often looks like an uncanny composite) | **100% Exact User Identity**                  |
| **Facial Bone Structure** | Warps to match reference actor's skull          | **Strictly preserved from uploaded portrait** |
| **Multi-Person Scenes**   | Faces frequently blend or switch roles mid-clip | **Absolute character slot isolation**         |
| **Camera Tracking**       | Static or rigid 2D planar warp                  | **Full 3D volumetric perspective alignment**  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.trendswap.app/core-engine/identity-preservation-protocol.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
