Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .ai/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Strive to write code as simple and explicit as possible.

## Reference guides

Read the relevant guide before writing code in its area — existing code may predate the current conventions.

- **Models** — see [models.md](models.md) for model conventions, attention pattern, implementation rules, dependencies, and gotchas. For adding or converting a model, use the [model-integration](./skills/model-integration/SKILL.md) skill.
- **Pipelines** — see [pipelines.md](pipelines.md) for pipeline conventions, patterns, and gotchas.
- **Modular pipelines** — see [modular.md](modular.md) for modular pipeline conventions, patterns, and gotchas.
Expand Down
8 changes: 5 additions & 3 deletions .ai/skills/model-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ Then work through the **Integration checklist** below
A pipeline in Diffusers (be it standard or modular) will have multiple components. These components can be models, schedulers, processors, etc.

- [ ] **Transformer model**
- [ ] Implement the model with `from_pretrained` support (conventions: [models.md](../../models.md))
- [ ] Read [models.md](../../models.md)
- [ ] Implement the model with `from_pretrained` support
- [ ] Convert weights (see **Weight / Checkpoint Conversion**)
- [ ] Parity test against the reference (internal, not shipped — see **Model parity test**)
- [ ] Register in the relevant `__init__.py` files (lazy imports)
- [ ] Model-level tests (see **Testing**)
- [ ] **VAE** (if applicable) — reuse an existing `AutoencoderKL*` if possible; if a new one is needed, follow the same sub-steps as the transformer
- [ ] **Scheduler** — reuse an existing scheduler, or add a custom one
- [ ] **Pipeline**
- [ ] Implement the pipeline — see [modular.md](../../modular.md) for modular pipeline, or [pipelines.md](../../pipelines.md) for standard pipeline
- [ ] Read [modular.md](../../modular.md) — or [pipelines.md](../../pipelines.md) for a standard pipeline
- [ ] Implement the pipeline
- [ ] Add a LoRA mixin if applicable
- [ ] Register in the relevant `__init__.py` files (lazy imports)
- [ ] Pipeline-level tests (see **Testing**)
Expand Down Expand Up @@ -87,7 +89,7 @@ Common conversion patterns to watch for model-level components:

## Testing

Two test layers must be added for any new pipeline: pipeline-level tests, and (if a new model is introduced) model-level tests. Conventions for both layers — file locations, tester mixins, dummy-component rules live in [testing.md](../../testing.md); follow it when writing the tests.
Two test layers must be added for any new pipeline: pipeline-level tests, and (if a new model is introduced) model-level tests. Read [testing.md](../../testing.md) before writing them — file locations, tester mixins, and dummy-component rules all live there.

## Model parity test

Expand Down
Loading