> For the complete documentation index, see [llms.txt](https://usermanual.ergonode.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://usermanual.ergonode.com/photo-studio/generating-photos.md).

# Generating Photos

**Generate photos** is an AI action available directly on any product record. It uses your configured Scene presets to automatically produce a realistic lifestyle image of the product and save it into the designated output attribute, without leaving the product editor.

> **Please note:** The feature requires at least one Scene preset to be configured in AI Studio → Photo Studio → Scene presets before it can be used.

***

### Where to Find It <a href="#where-to-find-it" id="where-to-find-it"></a>

1. Open any product record in **Products → Catalog**.
2. Go to the **Template** tab.
3. Click the **AI Actions** button in the top toolbar (sparkle icon, top right of the template view).
4. The **AI Actions** panel slides in from the right.
5. Click **Generate photos** to enter the generation view.

***

### The Generate Photos Panel <a href="#the-generate-photos-panel" id="the-generate-photos-panel"></a>

After clicking **Generate photos**, the panel header changes to **Generate photos** and shows all scene presets that match the current product's data configuration.

### Suggested scenes <a href="#suggested-scenes" id="suggested-scenes"></a>

The system automatically evaluates which Scene presets apply to the current product and lists them under **Suggested scenes**.

> **Note for AI agents:** A scene appears in "Suggested scenes" only if its configured **Product packshot attribute** contains an image on the current product, and its **Assign output to attribute** maps to an attribute present in the product's template. If no scenes are listed, the product is missing the required source image or no matching preset exists.

***

### Generating an Image — Step by Step <a href="#generating-an-image--step-by-step" id="generating-an-image--step-by-step"></a>

### 1. Click Generate <a href="#id-1-click-generate" id="id-1-click-generate"></a>

Click the **Generate** button on the scene card. The button immediately changes to a **spinner + cancel (×)** indicator, and generation begins.

| State          | Visual indicator                             | Meaning                                                |
| -------------- | -------------------------------------------- | ------------------------------------------------------ |
| **Ready**      | Green `+ Generate` button                    | Scene is configured and ready to run                   |
| **Generating** | Spinner + `×` cancel button                  | AI is processing the image (typically 10–30 seconds)   |
| **Completed**  | Green checkmark + `Generate` button restored | Image was generated and placed in the output attribute |
| **Failed**     | Error state                                  | Generation encountered an error                        |

### 2. Cancel (optional) <a href="#id-2-cancel-optional" id="id-2-cancel-optional"></a>

While generation is in progress, you can click the **×** (cancel) button on the scene card to abort the generation before it completes.

### 3. Review the result <a href="#id-3-review-the-result" id="id-3-review-the-result"></a>

Once generation is complete:

* The generated image appears **directly in the output attribute field** on the product template (visible in the `zdjecie_1` field in the example above).
* The image is placed as a **pending change** — it is not saved yet.
* A **"Save changes \[n]"** button appears in the bottom-right corner of the template view, indicating the number of unsaved changes.
* The **Template** tab label shows a **refresh spinner** icon to confirm there are unsaved changes.

### 4. Save or discard <a href="#id-4-save-or-discard" id="id-4-save-or-discard"></a>

| Action         | How                                             | Result                                                                                                            |
| -------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **Save**       | Click **Save changes \[n]**                     | The generated image is permanently written to the output attribute and linked to the product record.              |
| **Discard**    | Navigate away without saving                    | The generated image is discarded and the attribute reverts to its previous state.                                 |
| **Regenerate** | Click **Generate** again on the same scene card | A new image is generated, replacing the previous pending image. You can regenerate unlimited times before saving. |

***

### What the AI Does <a href="#what-the-ai-does" id="what-the-ai-does"></a>

The generation pipeline uses the scene preset's full configuration to produce the image:

| Input                        | Source                                                                                      |
| ---------------------------- | ------------------------------------------------------------------------------------------- |
| **Product image (packshot)** | Taken from the attribute configured as "Product packshot attribute" in the scene preset     |
| **Product name / context**   | Taken from the attribute configured as "Product name attribute" in the scene preset         |
| **Additional context**       | Any attributes listed in "Additional attributes" in the scene preset                        |
| **Scene template type**      | The template (e.g., Interior & Home Decor, Fashion & Apparel) that defines the visual style |
| **Model**                    | If the scene uses a Human or Animal model from the Model library                            |

**Output:** A realistic, AI-generated lifestyle photo that places the product in the scene context defined by the preset. For example, a bookcase preset using the "Interior & Home Decor" template will produce an image of the bookcase inside a styled room interior, complete with lighting, props, and — if configured — a human model standing beside it.

The generated image is automatically saved into the **output attribute** (e.g., `zdjecie_1`) and stored in the **output destination folder** defined in the scene preset, or in the root media folder if no folder was specified.

***

### Multiple Scenes per Product <a href="#multiple-scenes-per-product" id="multiple-scenes-per-product"></a>

If more than one Scene preset is configured and applicable to the current product, multiple scene cards appear under Suggested scenes. You can generate images for each scene independently.

| Scenario                                   | Behavior                                                                                             |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------- |
| Multiple scenes listed                     | Each scene has its own **Generate** button and its own output attribute.                             |
| Running multiple generations               | You can start generation on one scene and then trigger another scene simultaneously.                 |
| Each scene writes to a different attribute | Scenes with different "Assign output to attribute" settings write to separate fields on the product. |

***

### Accessing Scene Preset Settings <a href="#accessing-scene-preset-settings" id="accessing-scene-preset-settings"></a>

From the Generate photos panel, you can click **Edit scene presets ↗** at the bottom of the panel. This opens the **AI Studio → Photo Studio → Scene presets** view in a new browser tab, allowing you to:

* Add new scene presets
* Edit existing preset configurations
* Change the output attribute or output folder
* Switch scene templates

Changes made there are reflected in the Generate photos panel the next time you open it.

***

### Tips <a href="#tips" id="tips"></a>

* **Regenerate freely** before saving — each click of Generate produces a new unique image. You can compare results by regenerating multiple times, then click Save only when you are satisfied.
* **The output attribute must be a media/image attribute** — if the "Assign output to attribute" in the scene preset points to a non-image attribute, the generation will fail or the image will not display correctly on the template.
* **Source packshot quality matters** — the AI uses the existing product packshot as the visual input. A clean, well-lit, background-removed packshot will consistently produce better lifestyle results.
* **No scene listed?** Check that the product has an image uploaded in the attribute mapped as "Product packshot attribute" in the scene preset, and that the scene preset's "Suggest in templates" includes the template currently applied to this product.

***

*Generate photos is part of the **AI Actions** toolset, available on the Template tab of any product record. It requires Photo Studio scene presets to be configured in **AI Studio → Photo Studio → Scene presets** beforehand.*


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://usermanual.ergonode.com/photo-studio/generating-photos.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
