Character Composite · публичный навык Open Skill

Character Composite

Character Composite — публичный Open Skill на Digen. Откройте, чтобы увидеть, что создаёт этот процесс.

@eggs

Auto

0 0 1

https://d7qlwi7tl2u27.cloudfront.net/skill-covers/prod/4284862/2026-10-16/uymr6p9k.jpg

# Character Composite

Produces a single character-composite image from uploaded reference photos: the **facial identity comes from the uploaded person**, while the **clothing, pose and scene are re-staged for the requested theme**. The typical input is two images uploaded separately — one **body model** (the frame/body/scene to keep) and one **head model** (the face and identity to transfer).

Output: one image (delivered as a canvas asset). There is no structured project state — everything lives in the uploaded images, the conversation, and the assets already on the canvas.

## When to use

- The user uploads one or more photos and asks to "composite", "swap the head", "put this face on this body", "use this person in this scene", or "make a themed portrait of this person".
- The user uploads a **body model** image and separately a **head model** image and wants the merged result.
- The user wants to re-theme, re-roll, or adjust a composite produced earlier in the same conversation (new outfit/pose/scene, different framing, stronger/weaker identity preservation).

## Inputs and outputs

| | |
|---|---|
| Input | One or more **reference images** (body model and/or head/face model), optionally plus a short theme description |
| Output | One composite **image** per `generate_image` call |

How each input is used in the prompt:

- **Head / face reference** → the identity source. Its facial features, hairline, hair color, skin tone and age/gender presentation must be reproduced exactly.
- **Body / scene reference** → the frame source. Its body proportions, pose, clothing silhouette, camera angle and background must be kept (or, when the user asks for a new theme, used as the staging baseline that the theme replaces).
- **Text theme** → only changes costume, pose, scene, props and mood. It must never change the identity.

## Steps

1. **Identify the inputs before generating.** If it is not obvious which uploaded image is the head source and which is the body source, call `recognize_image(image_url=<uploaded image>, prompt="Which is this: a full/half body model photo, or a close-up head/face portrait? Describe the face, hair, clothing, pose, background and lighting.")` for each. Confirm with the user in one short sentence when the roles are ambiguous (e.g. only one image, or a photo containing two people).

2. **Load the visual conventions.** Before any `generate_image` call, run `read_skill_file(name='image-character-composite', path='references/style-and-prompt.md')`. That file holds the locked Style / Subject / Layout / Must keep / Must avoid rules plus the copy-and-fill prompt template. Do **not** improvise the style block from memory.

3. **Build the prompt** from the template in the reference file, filling in the theme, and explicitly naming the role of each image with the convention below:
   - `input_urls=[body_or_scene_image, head_reference_image]` — **first** the body/scene frame, **second** the head/identity source.
   - The prompt must state the same mapping ("first image = body and scene to keep; second image = head and identity to transfer") so the roles are unambiguous.
   - Include the identity-preservation clause, the head/neck blending clause, the single-theme style block (palette + material + light), the framing, and the "do not" list from the reference file.

4. **Call the image tool with the image-to-image channel:**

   ```
   generate_image(
     prompt=<prompt built in step 3>,
     input_urls=[<body/scene image>, <head/face image>],
     model='i2i.hd.gpt',
     orientation=<'portrait' by default; 'square' for avatar/headshot requests; 'landscape' only if the user asks for a wide scene>,
     resolution=<'1080P' by default>,
     name=<short canvas title, e.g. "Composite - cyberpunk studio">,
     entity_type='characters'
   )
   ```

   `i2i.hd.gpt` is the default channel for every reference-image composite. Never write a physical model name.

5. **Single-reference case.** If the user uploaded only one ima