[.ai] document single-file model layout and "don't reimplement DiffusionPipeline"
Two conventions that weren't written down, surfaced while reviewing a new
model/pipeline port:
- models.md: add a "Single-file model layout" section. A model lives in one
self-contained `transformer_<name>.py`; reuse shared blocks from
normalization.py/attention.py/embeddings.py and inline model-specific
variants with `# Copied from` rather than creating per-model
`attention_processor_<name>.py` / `block_<name>.py` / `rope_<name>.py`
companion files (no precedent for these in the repo).
- pipelines.md: add gotcha #7, "Don't reimplement DiffusionPipeline." A
subclass adds only pipeline-specific steps; device placement, offloading,
execution-device resolution, and module registration already exist on the
base class. No custom device/offload manager, no `device=` arg on
`__call__`, no `set_<component>` setters.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>