mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-03-23 06:40:23 -07:00
M01: add sgm denoiser_scaling, discretizer, DiffusionEngine, GeneralConditioner stubs; M01_run3 and M01_summary
Made-with: Cursor
This commit is contained in:
parent
1d3c4dcbd5
commit
bc3bd812dd
3 changed files with 188 additions and 2 deletions
84
docs/milestones/M01/M01_run3.md
Normal file
84
docs/milestones/M01/M01_run3.md
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
# M01 CI Run 3 — Stub Repositories (Iterative)
|
||||
|
||||
**Date:** 2026-03-08
|
||||
**Branch:** m01-ci-truthfulness
|
||||
**Trigger:** Stub repository approach (ac965561 → 1d3c4dcb)
|
||||
|
||||
---
|
||||
|
||||
## 1. Workflow Identity
|
||||
|
||||
| Workflow | Run ID | Status |
|
||||
|----------|--------|--------|
|
||||
| Linter | 22810292142 | ✓ success |
|
||||
| Tests | 22810292144 | ✗ failure |
|
||||
|
||||
---
|
||||
|
||||
## 2. Approach
|
||||
|
||||
**Stub repositories** instead of cache/submodules:
|
||||
|
||||
- `scripts/dev/create_stub_repos.py` creates minimal `repositories/` layout
|
||||
- Satisfies `paths.py` assertion and import chain
|
||||
- Deterministic, no network, no cloning
|
||||
|
||||
---
|
||||
|
||||
## 3. Stub Progression (by run)
|
||||
|
||||
| Run | Blocker | Fix |
|
||||
|-----|---------|-----|
|
||||
| 22810169638 | `paths.py` assert (ddpm.py) | Add ddpm.py stub |
|
||||
| 22810208301 | `LatentDiffusion` import | Add LatentDiffusion, LatentDepth2ImageDiffusion to ddpm |
|
||||
| 22810246639 | `ldm.util` | Add ldm.util.default |
|
||||
| 22810246639 | `ldm.modules.midas` | Add ldm.modules.midas |
|
||||
| 22810292144 | `sgm.models` | Add sgm.models.diffusion |
|
||||
| 22810326719 | `sgm.modules.diffusionmodules.denoiser_scaling` | Add denoiser_scaling, discretizer, DiffusionEngine, GeneralConditioner |
|
||||
|
||||
---
|
||||
|
||||
## 4. Current Stub Layout
|
||||
|
||||
```
|
||||
repositories/
|
||||
stable-diffusion-stability-ai/
|
||||
ldm/
|
||||
models/diffusion/ddpm.py (LatentDiffusion, LatentDepth2ImageDiffusion)
|
||||
util.py (default)
|
||||
modules/
|
||||
encoders/modules.py (FrozenCLIPEmbedder, FrozenOpenCLIPEmbedder, CLIPTextModel)
|
||||
attention/ (CrossAttention)
|
||||
diffusionmodules/model.py (AttnBlock)
|
||||
midas/
|
||||
generative-models/
|
||||
sgm/
|
||||
models/diffusion/ (DiffusionEngine)
|
||||
modules/
|
||||
encoders/modules.py
|
||||
attention/ (CrossAttention, SDP_IS_AVAILABLE, XFORMERS_IS_AVAILABLE)
|
||||
diffusionmodules/ (model, denoiser_scaling, discretizer, openaimodel)
|
||||
conditioner.py (GeneralConditioner)
|
||||
k-diffusion/
|
||||
BLIP/
|
||||
stable-diffusion-webui-assets/
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5. Remaining Blocker (Run 22810326719)
|
||||
|
||||
```
|
||||
ModuleNotFoundError: No module named 'sgm.modules.diffusionmodules.denoiser_scaling'
|
||||
```
|
||||
|
||||
Fix applied in next commit: add denoiser_scaling, discretizer, DiffusionEngine, GeneralConditioner, openaimodel stubs.
|
||||
|
||||
---
|
||||
|
||||
## 6. Next Steps
|
||||
|
||||
- Push stub additions
|
||||
- Run CI
|
||||
- If more import errors: add stubs iteratively
|
||||
- When server starts: verify pytest and coverage pass
|
||||
75
docs/milestones/M01/M01_summary.md
Normal file
75
docs/milestones/M01/M01_summary.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
# M01 Summary — CI Truthfulness & Guardrails
|
||||
|
||||
**Milestone:** M01
|
||||
**Branch:** m01-ci-truthfulness
|
||||
**Status:** In Progress (stub iteration)
|
||||
|
||||
---
|
||||
|
||||
## Accomplished
|
||||
|
||||
| Item | Status |
|
||||
|------|--------|
|
||||
| Same-repo PR CI | ✓ Removed skip condition |
|
||||
| CLIP/pkg_resources fix | ✓ `--no-build-isolation` in launch_utils |
|
||||
| `--skip-prepare-environment` | ✓ CI uses deterministic bootstrap |
|
||||
| `--exit` handling | ✓ Early exit when skip-prepare + --exit |
|
||||
| Install runtime deps | ✓ torch, clip, open_clip, requirements_versions |
|
||||
| pip-audit | ✓ Non-blocking |
|
||||
| SHA-pinned actions | ✓ |
|
||||
| .gitattributes | ✓ |
|
||||
| Smoke step | ✓ |
|
||||
| Coverage threshold | ✓ --cov-fail-under=60 |
|
||||
| Stub repositories | ✓ scripts/dev/create_stub_repos.py |
|
||||
|
||||
---
|
||||
|
||||
## Remaining Blocker
|
||||
|
||||
**Server startup fails** due to deep import chain from `ldm` and `sgm` packages.
|
||||
|
||||
With `--skip-prepare-environment`, no repos are cloned. The app expects `repositories/` to exist and imports from them at runtime.
|
||||
|
||||
**Solution:** Stub repositories (deterministic, no network).
|
||||
|
||||
**Progress:** Iterative stub addition. Each CI run reveals one more missing import. Stubs added so far:
|
||||
|
||||
- paths.py assertion (ddpm.py)
|
||||
- LatentDiffusion, LatentDepth2ImageDiffusion
|
||||
- ldm.util.default
|
||||
- ldm.modules.attention, diffusionmodules.model, midas
|
||||
- sgm.modules.encoders, attention, diffusionmodules
|
||||
- sgm.models.diffusion (DiffusionEngine)
|
||||
- sgm.modules.diffusionmodules.denoiser_scaling, discretizer
|
||||
- sgm.modules.GeneralConditioner, openaimodel
|
||||
|
||||
---
|
||||
|
||||
## CI Flow (Current)
|
||||
|
||||
```
|
||||
install deps → pip-audit → create stub repositories → setup env → smoke → start server → pytest → coverage
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Definition of Done (Status)
|
||||
|
||||
- [x] CI runs on push and pull_request
|
||||
- [x] Linter: PASS
|
||||
- [ ] Tests: PASS (blocked: server startup)
|
||||
- [ ] Coverage threshold enforced
|
||||
- [x] pip-audit runs
|
||||
- [x] All actions pinned to SHAs
|
||||
- [x] .gitattributes present
|
||||
- [ ] docs/serena.md updated (when M01 closes)
|
||||
|
||||
---
|
||||
|
||||
## When M01 Closes
|
||||
|
||||
1. Stub iteration completes (server starts, pytest passes)
|
||||
2. Update docs/serena.md ledger
|
||||
3. Generate M01_audit.md
|
||||
4. Merge m01-ci-truthfulness
|
||||
5. Tag milestone
|
||||
Loading…
Add table
Add a link
Reference in a new issue