From b80ec79540cda08d5b339d1c5a17ab3b7a958601 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Sat, 7 Mar 2026 16:14:40 -0800 Subject: [PATCH] M01: add LatentDiffusion stub to ddpm.py for sd_models_types import Made-with: Cursor --- scripts/dev/create_stub_repos.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/dev/create_stub_repos.py b/scripts/dev/create_stub_repos.py index dc78068bc..f1b469d14 100644 --- a/scripts/dev/create_stub_repos.py +++ b/scripts/dev/create_stub_repos.py @@ -19,8 +19,13 @@ def touch(path: str, content: str = "") -> None: def main() -> None: sd = "stable-diffusion-stability-ai" - # paths.py asserts ldm/models/diffusion/ddpm.py - touch(os.path.join(REPOS, sd, "ldm", "models", "diffusion", "ddpm.py"), "# stub\n") + # paths.py asserts ldm/models/diffusion/ddpm.py; sd_models_types imports LatentDiffusion + ddpm_content = ( + "# stub for CI\n" + "class LatentDiffusion:\n pass\n" + "class LatentDepth2ImageDiffusion(LatentDiffusion):\n pass\n" + ) + touch(os.path.join(REPOS, sd, "ldm", "models", "diffusion", "ddpm.py"), ddpm_content) touch(os.path.join(REPOS, sd, "ldm", "__init__.py")) touch(os.path.join(REPOS, sd, "ldm", "modules", "__init__.py")) touch(os.path.join(REPOS, sd, "ldm", "modules", "encoders", "__init__.py"))