Happy path do gameassets batch quando a GPU passa pelo Unified Model Server.
Complementa MODEL_FINDINGS.md §8 e
findings/UMS_VRAM_FINDINGS.md.
Código: GameAssets/src/gameassets/ums_coord.py, ums_batch.py,
batch_cmd.py · Omni soft-fill: omni_ctrl.py · DAG pós-GPU:
findings/MESH_PIPELINE_FINDINGS.md (Round 3).
- Batch agrupa jobs GPU em waves (mesmo backend) →
run_gpu_wave. - Cada job = payload vramd (
*/ums_payload.py+resolve_*_vram_optshw_auto). - Não faz preload sync de text3d/paint (
preload=False) — o 1.º job da wave carrega o modelo (evita Broken pipe / free stuck). - Master pipeline (topology → … → lod) corre em CPU e é adiado
(
MasterDeferQueue) até a wave GPU relevante acabar — evita misturar finalize com thrash text3d↔paint3d. - Se vramd indisponível /
queue_fullsem progresso →FALLBACK_SUBPROCESS(CLI filho; ainda tipicamente com vramd viatry_vramd_delegation).
shapes (text3d) → ensure_to_paint (CPU)
→ paints (paint3d) → drain MasterDeferQueue (master DAG)
→ waves opcionais 2D/audio/terrain conforme manifest
→ simplify / catch-up / handoff
| Wave | Backend | Entry | Notas |
|---|---|---|---|
| Shape | text3d |
run_shape_wave_or_fallback |
Omni via resolve_row_omni + softfill |
| Paint | paint3d |
run_paint_wave_or_fallback |
Peak: mem-eff / SDNQ no payload |
| Text2D | text2d |
run_text2d_wave_or_fallback |
|
| Icon | text2icon |
run_text2icon_wave_or_fallback |
|
| Texture | texture2d |
run_texture2d_wave_or_fallback |
|
| Skymap | skymap2d |
run_skymap2d_wave_or_fallback |
|
| Sound | text2sound |
run_text2sound_wave_or_fallback |
|
| Terrain | terrain3d |
run_terrain3d_wave_or_fallback |
Specs: shape_specs_from_items, paint_specs_from_items, …
run_gpu_wave mantém no máximo ~16 jobs submitted em voo
(window = min(16, max_queue_depth - 1)). Em queue_full, drena waits antes
de mais submits — não explode a fila vramd.
resolve_text3d_vram_opts / resolve_paint3d_vram_opts / …:
- Flags explícitas profile/manifest
- Senão hw_auto da tool
- Fallback admit-safe (~6 GB): tip.
sdnq-int4+memory_efficient
Sem quant no payload → vramd assume fp16 → refuse em 6 GB. Não é flag CLI
pública — vai no dict vramd (with_vramd_peak_opts).
| Tipo | Papel |
|---|---|
MasterPendingItem |
rec + mesh_final + row |
MasterDeferQueue.enqueue |
Guarda finalize durante a wave |
.drain(finalize_fn) |
Corre run_master_pipeline (ou equivalente) no fim |
Anti-padrão: chamar master (paint→rig→lod) a meio da wave paint — thrash VRAM e resume inconsistente.
resolve_row_omni(pipeline) — merge profile + row.softfill_omni_from_category— se sem controlo geométrico activo.prepare_shape_for_generation/shape_omni_stale— sidecar*_shape.omni.json; fingerprint muda → regen.omni_to_cli_flags/ campos nobuild_generate_request(Text3Dums_payload).
Detalhe: OMNI_SHAPE_FINDINGS.md § soft-fill.
Propagados a filhos GPU (UMS_CHILD_ENV_KEYS + apply_ums_child_env):
| Var / flag | Papel |
|---|---|
VRAMD_PRIORITY=batch |
Batch cede a interactive |
--vramd-stream / VRAMD_STREAM=1 |
NDJSON progresso |
--no-vramd |
Bypass supervisor (avançado) |
VRAMD_DEBUG |
Dump debug nas CLIs |
VRAMD_MAX_* |
depth / inflight / affinity |
Após editar código de uma tool: vramd respawn <backend> (não precisa restart
do supervisor). Ver Vramd/README.md.
vramd status/queue/doctor— HOLDING, free vs peak.- Batch a correr → esperar ou
vramd cancel/flush; nunca pkill GPU. - Shape fail todos com “livre < peak” e vramd idle →
vramd stop+vramd start(contexto CUDA residual). - Confirmar payloads com quant (
vramd debug/ logs). - Resume: intermediários em
_intermediate/; não regenerar shapes só porque o path público está vazio.
GameAssets/tests/test_ums_batch.py,test_ums_coord.pytest_omni_softfill.py- Armadilhas:
findings/UMS_VRAM_FINDINGS.md§ testes com vramd vivo
| Data | Nota |
|---|---|
| 2026-07-24 | Guia operador: waves, window≤16, defer master, softfill, peak hw_auto |