Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
docs(agents): cap pytest workers on development machines
Lincoln Stein16ea7518150d
diff --git a/AGENTS.md b/AGENTS.mdindex 127611c0d1..72c42eb2e1 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -66,6 +66,7 @@ If the environment cannot spawn subagents, perform separate self-review passes w- Use the existing Python environment and `uv.lock`. For a fresh test environment: `uv sync --locked --extra test`; do not replace a configured accelerator environment with a different backend as routine setup.- From the root: `uv tool run [email protected] check <paths>` and `uv tool run [email protected] format --check <paths>`. Python uses 120-column formatting and absolute imports. Respect configured vendored-code exclusions.- Run focused Python tests with `uv run --no-sync pytest <test-paths>`; the full CI suite is `uv run --no-sync pytest -n logical` (xdist; each file's tests stay on a single worker). Slow tests are excluded by default: `slow` is the lane for what needs a development machine -- real accelerator hardware, or a quiet one for timing -- and is run there with `-m slow`, not by CI.+- `-n logical` is CI's invocation, sized for a runner that owns its machine. Do not use it on a development box: it starts one worker per logical core, each importing torch, and a development box is usually also holding a model. Cap the workers instead -- `-n 4` is a reasonable default, and plain `pytest` (no `-n`) is the safe choice -- and do not start a suite while a generation is running. Note that dropping `-n` does not make a run single-threaded: torch still spawns its own thread pool per process, so set `OMP_NUM_THREADS` as well when a run has to stay light.- `uv run --no-sync mypy scripts/invokeai-web.py` is an additional diagnostic using the current exclusions, not an enforced CI gate. Do not describe it as comprehensive type coverage.- Choose checks by changed behavior. Broaden to the milestone's required gates before review; do not repeatedly rerun unchanged checks without a reason.- Install local hooks with `uv run --no-sync pre-commit install` after test dependencies are available. Hook installation is local to each checkout and is not implied by committing the configuration.