From 7e6fc8bfb970c67ee057e1ac56ec10f34f9f13b5 Mon Sep 17 00:00:00 2001 From: Victor Kuznetsov Date: Mon, 8 Jun 2026 15:46:28 -0700 Subject: [PATCH] fix(photomaker extra): add einops explicitly (upstream missed it) PhotoMaker imports einops in its forward path but its install_requires doesn't declare it, so the photomaker extra resolved without einops on a clean install and the Modal cert sweep died at the restore-faces step with "No module named 'einops'" -- the post-pass failed gracefully and returned the un-restored cleaned output, so the cert artifact had no face recovery. Pin einops>=0.7.0 in the photomaker extra so the extra is self-contained. Co-Authored-By: Claude Opus 4.8 (1M context) --- pyproject.toml | 4 ++++ uv.lock | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 997a9a1..7a5f41c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,10 @@ lama = [ photomaker = [ "photomaker @ git+https://github.com/TencentARC/PhotoMaker.git", "huggingface-hub>=0.20.0", + # Upstream PhotoMaker imports `einops` but doesn't declare it in its install_requires + # (verified 2026-06-04: cert sweep failed with "No module named 'einops'"). Pin it + # here so the extra is self-contained. + "einops>=0.7.0", ] # Optional pre-diffusion super-resolution for small inputs (Real-ESRGAN). Loaded via # spandrel (MIT) -- a pure model-loader with NO basicsr dependency (it pulls only diff --git a/uv.lock b/uv.lock index c467e98..d404a3b 100644 --- a/uv.lock +++ b/uv.lock @@ -2288,6 +2288,7 @@ lama = [ { name = "onnxruntime", version = "1.26.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, ] photomaker = [ + { name = "einops" }, { name = "huggingface-hub" }, { name = "photomaker" }, ] @@ -2300,6 +2301,7 @@ requires-dist = [ { name = "accelerate", marker = "extra == 'gpu'", specifier = ">=0.25.0" }, { name = "click", specifier = ">=8.0.0" }, { name = "diffusers", marker = "extra == 'gpu'", specifier = ">=0.38.0" }, + { name = "einops", marker = "extra == 'photomaker'", specifier = ">=0.7.0" }, { name = "huggingface-hub", marker = "extra == 'lama'", specifier = ">=0.20.0" }, { name = "huggingface-hub", marker = "extra == 'photomaker'", specifier = ">=0.20.0" }, { name = "invisible-watermark", marker = "extra == 'detect'", specifier = ">=0.2.0" },