You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/DATALOADER.es.md
+27-3Lines changed: 27 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,7 +270,7 @@ Los backends de memoria requieren Linux o macOS y suficiente RAM o swap para la
270
270
### `instance_data_dir` / `aws_data_prefix`
271
271
272
272
-**Local:** Ruta a los datos en el filesystem.
273
-
-**AWS:** Prefijo S3 de los datos en el bucket.
273
+
-**AWS:** Prefijo S3 de los datos en el bucket.`aws_data_prefix` puede ser una cadena para un prefijo o una lista de cadenas para escanear varios prefijos del mismo bucket.
274
274
275
275
### `caption_strategy`
276
276
@@ -999,6 +999,32 @@ Las coordenadas del bounding box estan normalizadas a [0, 1] en formato XYXY. El
999
999
1000
1000
Para datasets parquet o HuggingFace, especifica un `bbox_column` en la configuracion del backend.
1001
1001
1002
+
## Filtrado de muestras
1003
+
1004
+
### `filter_func`
1005
+
1006
+
`filter_func` puede configurarse en el nivel superior de cualquier backend de dataset para omitir muestras antes de construir buckets de metadatos y cachés VAE. Los backends de Hugging Face siguen aceptando la ubicación antigua `huggingface.filter_func`, pero el valor superior tiene prioridad si ambos existen.
1007
+
1008
+
Filtros admitidos:
1009
+
1010
+
-`collection`: lista permitida de coincidencia exacta para el campo `collection` de una fila.
1011
+
-`quality_thresholds`: valores numéricos mínimos dentro de `quality_column` (por defecto, `quality_assessment`).
1012
+
-`min_width` / `min_height`: dimensiones mínimas de fila cuando existen campos de ancho y alto.
1013
+
-`path_include` / `path_exclude`: filtrado por nombre de archivo/ruta para datasets local, AWS, CSV, Hugging Face, parquet y Webshart. `path_include` es lista permitida y `path_exclude` lista bloqueada. Las exclusiones ganan si ambas coinciden.
1014
+
-`path_match`: modo de coincidencia de rutas. `auto` (predeterminado para claves planas) usa subcadenas para texto normal, glob para `*` y `?`, y regex para patrones con prefijo `re:`. También se puede usar `contains`, `glob`, `regex` o `exact`.
La forma antigua anidada `filter_func.path.include` / `exclude` / `mode` sigue aceptándose para configs existentes, pero las nuevas configs deben usar las claves planas anteriores.
`--destination` escribe un árbol de metadata portátil por shard, y `--push-to-hub` lo sube a un repositorio de metadata; después apunta la opción `metadata` del dataloader a ese repositorio. `--shard-cache-dir` permite que la consolidación reutilice shards completamente cacheados en lugar de emitir una lectura por rango por cada sidecar.
1370
1396
1371
-
Este backend requiere un build de Webshart con `TarDataLoader.list_shard_sample_aspect_buckets()`; `webshart_optimize_captions` requiere además `probe_caption_layout()` y `coalesce_caption_metadata()`.
1372
-
1373
1397
## Mapeo personalizado de relación de aspecto a resolución
1374
1398
1375
1399
Cuando SimpleTuner inicia por primera vez, genera listas de mapeo de aspecto específicas de resolución que vinculan un valor decimal de relación de aspecto con su tamaño de píxel objetivo.
Copy file name to clipboardExpand all lines: documentation/DATALOADER.hi.md
+27-3Lines changed: 27 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,7 +270,7 @@ Memory backends के लिए Linux या macOS और मौजूदा ca
270
270
### `instance_data_dir` / `aws_data_prefix`
271
271
272
272
-**Local:** filesystem पर डेटा का path.
273
-
-**AWS:** bucket में डेटा का S3 prefix.
273
+
-**AWS:** bucket में डेटा का S3 prefix.`aws_data_prefix` एक prefix के लिए string हो सकता है, या उसी bucket में कई prefixes scan करने के लिए strings की list हो सकता है.
274
274
275
275
### `caption_strategy`
276
276
@@ -999,6 +999,32 @@ Bounding box coordinates XYXY format में [0, 1] पर normalised हो
999
999
1000
1000
Parquet या HuggingFace datasets के लिए, backend config में `bbox_column` specify करें।
1001
1001
1002
+
## Samples फ़िल्टर करना
1003
+
1004
+
### `filter_func`
1005
+
1006
+
`filter_func` किसी भी dataset backend के top level पर सेट किया जा सकता है ताकि metadata buckets और VAE caches बनने से पहले samples skip किए जा सकें। Hugging Face backends compatibility के लिए पुराने `huggingface.filter_func` स्थान को अभी भी स्वीकार करते हैं, लेकिन दोनों मौजूद होने पर top-level value प्राथमिकता लेती है।
1007
+
1008
+
Supported filters:
1009
+
1010
+
-`collection`: row के `collection` field के लिए exact-match whitelist।
1011
+
-`quality_thresholds`: `quality_column` (default: `quality_assessment`) में minimum numeric values।
1012
+
-`min_width` / `min_height`: width और height fields उपलब्ध होने पर minimum row dimensions।
1013
+
-`path_include` / `path_exclude`: local, AWS, CSV, Hugging Face, parquet, और Webshart datasets के लिए filename/path filtering। `path_include` whitelist है और `path_exclude` blacklist है। दोनों match होने पर exclude जीतेगा।
1014
+
-`path_match`: path matching mode. Flat keys के लिए default `auto` है: plain text के लिए substring match, `*` और `?` के लिए glob, और `re:` prefix वाले patterns के लिए regex। `contains`, `glob`, `regex`, या `exact` भी इस्तेमाल कर सकते हैं।
पुराना nested form `filter_func.path.include` / `exclude` / `mode` existing configs के लिए अब भी accepted है, लेकिन नए configs में ऊपर वाली flat keys इस्तेमाल करें।
`--destination` एक portable per-shard metadata tree लिखता है, और `--push-to-hub` उसे metadata repository पर upload करता है; बाद में dataloader के `metadata` option को उसी repository पर point करें। `--shard-cache-dir` से coalescing हर sidecar के लिए एक range read करने की बजाय पूरी तरह cached shards reuse कर पाती है।
1370
1396
1371
-
इस backend के लिए `TarDataLoader.list_shard_sample_aspect_buckets()` वाला Webshart build चाहिए; `webshart_optimize_captions` के लिए अतिरिक्त रूप से `probe_caption_layout()` और `coalesce_caption_metadata()` भी चाहिए।
1372
-
1373
1397
## Custom aspect ratio‑to‑resolution mapping
1374
1398
1375
1399
जब SimpleTuner पहली बार चलता है, तो यह resolution‑specific aspect mapping lists बनाता है जो decimal aspect‑ratio मान को target pixel size से जोड़ते हैं।
Copy file name to clipboardExpand all lines: documentation/DATALOADER.md
+36-3Lines changed: 36 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,7 +272,7 @@ Memory backends require Linux or macOS and enough RAM or swap for the existing c
272
272
### `instance_data_dir` / `aws_data_prefix`
273
273
274
274
-**Local:** Path to the data on the filesystem.
275
-
-**AWS:** S3 prefix for the data in the bucket.
275
+
-**AWS:** S3 prefix for the data in the bucket. Set `aws_data_prefix` to a string for one prefix, or to a list of strings to scan multiple prefixes in the same bucket.
276
276
277
277
### `caption_strategy`
278
278
@@ -1045,6 +1045,41 @@ The column value is parsed using the same formats as `.bbox` files (JSON array o
1045
1045
1046
1046
---
1047
1047
1048
+
## Filtering samples
1049
+
1050
+
### `filter_func`
1051
+
1052
+
`filter_func` may be set at the top level of any dataset backend to skip samples before metadata buckets and VAE caches are built. Hugging Face backends still accept the older nested `huggingface.filter_func` location, but the top-level value takes precedence when both are present.
1053
+
1054
+
Supported filters:
1055
+
1056
+
-`collection`: exact-match whitelist for a row's `collection` field. This is available when the backend has row metadata, such as Hugging Face datasets.
1057
+
-`quality_thresholds`: minimum numeric values inside `quality_column` (default: `quality_assessment`). This is available when the backend has row metadata.
1058
+
-`min_width` / `min_height`: minimum row dimensions when width and height fields are available.
1059
+
-`path_include` / `path_exclude`: filename/path filtering for local, AWS, CSV, Hugging Face, parquet, and Webshart datasets. Includes are a whitelist and excludes are a blacklist. Excludes win if both match.
1060
+
-`path_match`: path match mode. `auto` (default for flat keys) uses fast substring matching for plain text, glob matching for `*` and `?`, and regex matching for patterns prefixed with `re:`. You can also set `contains`, `glob`, `regex`, or `exact`.
The older nested `filter_func.path.include` / `exclude` / `mode` form is still accepted for existing configs, but new configs should use the flat keys above.
`--destination` writes a portable per-shard metadata tree, and `--push-to-hub` uploads it to a metadata repository; point the dataloader `metadata` option at that repository afterwards. `--shard-cache-dir` lets coalescing reuse fully cached shards instead of issuing one range read per sidecar.
1417
1452
1418
-
This backend requires a Webshart build with `TarDataLoader.list_shard_sample_aspect_buckets()`; `webshart_optimize_captions` additionally requires `probe_caption_layout()` and `coalesce_caption_metadata()`.
1419
-
1420
1453
## Custom aspect ratio-to-resolution mapping
1421
1454
1422
1455
When SimpleTuner first launches, it generates resolution-specific aspect mapping lists that link a decimal aspect-ratio value to its target pixel size.
Copy file name to clipboardExpand all lines: documentation/DATALOADER.pt-BR.md
+27-3Lines changed: 27 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -270,7 +270,7 @@ Backends de memória exigem Linux ou macOS e RAM ou swap suficiente para o cache
270
270
### `instance_data_dir` / `aws_data_prefix`
271
271
272
272
-**Local:** Caminho para os dados no sistema de arquivos.
273
-
-**AWS:** Prefixo S3 para os dados no bucket.
273
+
-**AWS:** Prefixo S3 para os dados no bucket.`aws_data_prefix` pode ser uma string para um prefixo ou uma lista de strings para varrer vários prefixos no mesmo bucket.
274
274
275
275
### `caption_strategy`
276
276
@@ -999,6 +999,32 @@ As coordenadas do bounding box sao normalizadas para [0, 1] no formato XYXY. O f
999
999
1000
1000
Para datasets parquet ou HuggingFace, especifique um `bbox_column` na configuracao do backend.
1001
1001
1002
+
## Filtragem de amostras
1003
+
1004
+
### `filter_func`
1005
+
1006
+
`filter_func` pode ser configurado no nível superior de qualquer backend de dataset para pular amostras antes da criação dos buckets de metadados e caches VAE. Backends Hugging Face ainda aceitam o local antigo `huggingface.filter_func`, mas o valor de nível superior tem prioridade quando ambos existem.
1007
+
1008
+
Filtros suportados:
1009
+
1010
+
-`collection`: lista permitida com correspondência exata para o campo `collection` de uma linha.
1011
+
-`quality_thresholds`: valores numéricos mínimos dentro de `quality_column` (padrão: `quality_assessment`).
1012
+
-`min_width` / `min_height`: dimensões mínimas da linha quando campos de largura e altura existem.
1013
+
-`path_include` / `path_exclude`: filtragem por nome de arquivo/caminho para datasets local, AWS, CSV, Hugging Face, parquet e Webshart. `path_include` é uma lista permitida e `path_exclude` uma lista bloqueada. Exclusões vencem se ambas coincidirem.
1014
+
-`path_match`: modo de correspondência de caminhos. `auto` (padrão para chaves planas) usa substring para texto simples, glob para `*` e `?`, e regex para padrões com prefixo `re:`. Também é possível usar `contains`, `glob`, `regex` ou `exact`.
A forma antiga aninhada `filter_func.path.include` / `exclude` / `mode` continua aceita para configs existentes, mas novas configs devem usar as chaves planas acima.
`--destination` grava uma árvore de metadados portátil por shard, e `--push-to-hub` a envia para um repositório de metadata; depois aponte a opção `metadata` do dataloader para esse repositório. `--shard-cache-dir` permite que a consolidação reutilize shards totalmente em cache em vez de emitir uma leitura por intervalo para cada sidecar.
1370
1396
1371
-
Esse backend exige um build do Webshart com `TarDataLoader.list_shard_sample_aspect_buckets()`; `webshart_optimize_captions` exige adicionalmente `probe_caption_layout()` e `coalesce_caption_metadata()`.
1372
-
1373
1397
## Mapeamento personalizado de proporção para resolução
1374
1398
1375
1399
Quando o SimpleTuner inicia pela primeira vez, ele gera listas de mapeamento de aspecto específicas de resolução que vinculam um valor decimal de proporção a seu tamanho de pixel alvo.
0 commit comments