mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-28 11:32:22 +00:00
Turn a text prompt into a petdex-spec spritesheet (8×9 grid of 192×208 cells), grounded so every animation row stays the same creature: - orchestrate: base drafts (distinct variation nudges) → per-row grounded generation → atlas compose; one image call per row, rows fan out in parallel. - atlas: frame-perfect registration in normalize_cells — 1-D cross-correlation of each frame's column-mass profile locks the body (robust to limbs/cape), one shared per-state scale, bottom-anchored; plus alpha-hole repair, gutter severing, and interior-seeded chroma-pocket clearing. - prompts: pixel-art-by-default style hints + registration constraints. - store: local pet write (register_local_pet), slugify/unique_slug, export_pet, slug-realigning rename_pet, createdBy provenance.
29 lines
882 B
Python
29 lines
882 B
Python
"""Pet generation — base-draft → hatch pipeline.
|
|
|
|
Public surface used by the gateway RPCs, the CLI ``hermes pets generate``
|
|
command, and tests:
|
|
|
|
- :func:`generate_base_drafts` / :func:`hatch_pet` — the two-step flow.
|
|
- :class:`HatchResult`, :class:`GenerationError`.
|
|
- :mod:`atlas` — deterministic frame extraction + atlas composition/validation.
|
|
|
|
Image generation is delegated to the active reference-capable
|
|
:class:`~agent.image_gen_provider.ImageGenProvider` (OpenAI gpt-image-2 or Krea);
|
|
atlas assembly is fully deterministic so it's testable without any API calls.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from agent.pet.generate.imagegen import GenerationError
|
|
from agent.pet.generate.orchestrate import (
|
|
HatchResult,
|
|
generate_base_drafts,
|
|
hatch_pet,
|
|
)
|
|
|
|
__all__ = [
|
|
"GenerationError",
|
|
"HatchResult",
|
|
"generate_base_drafts",
|
|
"hatch_pet",
|
|
]
|