AUTOMATIC1111/stable-diffusion-webui
How to contribute
This section is a quick reference for working in the codebase. The original "human" version of this content lives at the project's GitHub Contributing wiki page; the pages here focus on what's enforced by the repo itself.
At a glance
- The default development branch is
dev. PRs should targetdev, notmaster. Fixes that need to ship to users immediately can be cherry-picked intorelease_candidateand thenmasteras part of a release. - Every PR that changes Python code is run through ruff in CI. The config is in
pyproject.toml. - JavaScript changes are run through eslint. The config is in
.eslintrc.js. - The CI workflow
.github/workflows/run_tests.yamlstarts a CPU-only server with a stub model and runspytest test/. - The PR template (
.github/pull_request_template.md) asks for a clear description and a link to a related issue if any.
Working in this repository
| Want to… | Read |
|---|---|
| Make changes through the standard branch/PR cycle | development-workflow.md |
| Run, write, or extend tests | testing.md |
| Track down a bug, NaN, or model loading issue | debugging.md |
| Match the project's coding patterns | patterns-and-conventions.md |
| Use the build, lint, or release tooling | tooling.md |
Definition of done
A change is ready to merge when:
- It passes ruff (
ruff check .) and eslint (npm run lint). - The CPU test server can boot with the change applied (
python launch.py --skip-torch-cuda-test --use-cpu all). - Existing tests under
test/still pass. - New behaviour with externally observable consequences (new options, new API endpoints, changed infotext output) has at least a one-line note added to
CHANGELOG.mdunder the active "next release" header on thedevbranch. - If the change is large enough that an end user would want to know about it, the
## Unreleasedsection inCHANGELOG.mdincludes a bullet under one of the four standard sections: Features, Minor, Extensions and API, Performance, Bug Fixes, or Other.
Commit message conventions
There is no strict commit-message convention. The project's history shows a mix of conventional-commits-style prefixes (fix:, feat:), short imperative sentences ("add lora to extra networks"), and merge commits with PR references. Keep the first line under ~72 characters and link to the PR or issue in the body.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.
Previous
Fun facts
Next
Development workflow