Commit Graph
2 Commits
Author SHA1 Message Date
Jason HokuandClaude Fable 5.1 98fcf0861c feat(encode): te_batch_size Run Setting wires text-encoder batching into pre-encode
batch_encode_with_cache/batch_encode_prompts take te_batch_size (default 1 =
off, DEFAULT_TE_BATCH_SIZE) and a hidden te_batch_verify; batched prompts are
cached, leftovers take the unchanged per-prompt loop, and the summary line
reports batched prompts/forwards. Builder state default + migration, Run
Settings control, state_to_configs_json emission, orchestrator read, README.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:05:57 -08:00
Jason HokuandClaude Fable 5.1 cd29abe52a feat(encode): batch several prompts through one text-encoder forward
encode_prompts_batched right-pads eligible prompts, runs ONE real encode on the
batch via a replay shadow on the inner encoder, and replays per-prompt slices
through the unmodified _encode_single (template strip, mask pop, clip_skip).
Allowlisted LLM-style encoders only (MOSS-Image, Krea 2, Qwen-Image); weighted,
AND/CAT/AVG/BREAK prompts fall back. Token cap, OOM halving, first-batch
self-check and an optional per-prompt verify mode. The shadow is always removed
in a finally. _encode_single gains tokens=None and restores clip_layer on error.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-04 00:02:16 -08:00