From 623a66538f3203e9c20c4f18c1ee9c1968d04bc4 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Sat, 7 Mar 2026 16:17:10 -0800 Subject: [PATCH] M01: add ldm.util stub (default) for sd_hijack_optimizations Made-with: Cursor --- scripts/dev/create_stub_repos.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/dev/create_stub_repos.py b/scripts/dev/create_stub_repos.py index f1b469d14..a5379af22 100644 --- a/scripts/dev/create_stub_repos.py +++ b/scripts/dev/create_stub_repos.py @@ -26,6 +26,8 @@ def main() -> None: "class LatentDepth2ImageDiffusion(LatentDiffusion):\n pass\n" ) touch(os.path.join(REPOS, sd, "ldm", "models", "diffusion", "ddpm.py"), ddpm_content) + # ldm.util: default, instantiate_from_config, ismap, etc. (sd_hijack_optimizations, etc.) + touch(os.path.join(REPOS, sd, "ldm", "util.py"), "def default(a, b): return b if a is None else a\n") 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"))