# Dataset Preparation

Before fine-tuning, prepare your dataset as a **ZIP file**. Then upload it to a **public URL** or via the Segmind **data upload endpoint**.

***

## Upload Endpoints

* **Flux Dev** → [Upload here](https://docs.segmind.com/readme/flux-fine-tuning/flux-fine-tuning-api#id-4.-get-fine-tune-data-upload-pre-signed-url)
* **Flux Kontext** → [Upload here](https://docs.segmind.com/readme/flux-fine-tuning/flux-kontext-fine-tuning-api#id-4.-get-fine-tune-data-upload-pre-signed-url)
* **Fast Flux** → [Upload here](https://docs.segmind.com/readme/flux-fine-tuning/fast-flux-fine-tuning-api#id-4.-get-fine-tune-data-upload-pre-signed-url)
* **Flux Pro** → [Upload here](https://docs.segmind.com/readme/flux-fine-tuning/flux-pro-fine-tuning-api#id-4.-get-fine-tune-data-upload-pre-signed-url)

⚠️ Use **public or private upload** depending on your model.

***

## Pipeline-Specific Guidelines

### 🔹 Flux Dev

* Upload 10–20 images in a ZIP.
* Select a `trigger_word` → model learns to associate this word with your subject/style.
* Captions: Auto-generated or custom `.txt` per image.
  * Example: `img_0.jpg` → `img_0.txt`.
* Image resolution: \~1024×1024 (larger images will be resized).
* Style LoRAs: Use images highlighting distinctive features, keep style consistent.
* Character LoRAs: Show subject in different settings/expressions.
  * Avoid different haircuts, ages, or excessive hand-face overlaps.

📌 **Reference Dataset:** Coming soon.

***

### 🔹 Flux Pro

* At least 5 high-quality images.
* Supported: JPG, JPEG, PNG, WebP.
* Optional `.txt` files with same name as images.
  * Example: `sample.jpg` → `sample.txt`.
* Package all into a single ZIP.

📌 **Reference Dataset:** Coming soon.

***

### 🔹 Fast Flux

* Upload 10–20 images in a ZIP.
* Select a `trigger_word`.
* Captions: Auto-generated or custom `.txt` per image.
  * Example: `img_0.jpg` → `img_0.txt`.
* Image resolution: \~1024×1024.
* Style LoRAs: Use varied subjects, keep style consistent.
* Character LoRAs: Avoid hair/age variations & hand-face overlaps.

📌 **Reference Dataset:** Coming soon.

***

### 🔹 Flux Kontext

* Paired images (`INDEX_start.ext` and `INDEX_end.ext`).
* `INDEX.txt` optional (edit instructions).
* Use zero-padded indexes (`01`, `02`, …).

📌 **Reference Dataset:** [Kontext Fine-Tune Samples](https://github.com/segmind/kontext-finetune-datasets/)


---

# Agent Instructions: 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:

```
GET https://docs.segmind.com/readme/flux-fine-tuning/dataset_preparation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
