Spaces:
Running on Zero
Running on Zero
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -133,19 +133,21 @@ pipeline = PPMemImageToVideoPipeline(
|
|
| 133 |
encoder = LatentEncoder(vae, device=DEVICE, dtype=DTYPE)
|
| 134 |
|
| 135 |
|
| 136 |
-
# The repo binds InferenceEngine.encode_depth_to_latent AND normalize_depth to
|
| 137 |
-
# plain
|
| 138 |
-
#
|
| 139 |
-
#
|
|
|
|
| 140 |
class _DepthCodec:
|
| 141 |
-
normalize_depth =
|
|
|
|
| 142 |
|
| 143 |
|
| 144 |
codec = _DepthCodec()
|
| 145 |
codec.vae = vae
|
| 146 |
codec.model_dtype = DTYPE
|
| 147 |
codec.device = DEVICE
|
| 148 |
-
encode_depth_to_latent =
|
| 149 |
|
| 150 |
moge = None # lazy: bundled examples ship geometry.npz and never touch MoGe
|
| 151 |
|
|
|
|
| 133 |
encoder = LatentEncoder(vae, device=DEVICE, dtype=DTYPE)
|
| 134 |
|
| 135 |
|
| 136 |
+
# The repo binds InferenceEngine.encode_depth_to_latent AND normalize_depth to the
|
| 137 |
+
# plain `self`-taking functions (engine/builder.py:115-116: `InferenceEngine.normalize_depth
|
| 138 |
+
# = depth_latent.normalize_depth`); encode_depth_to_latent calls self.normalize_depth
|
| 139 |
+
# internally (depth_latent.py:88). Mirror that assignment on a host object exactly:
|
| 140 |
+
# plain-function class attributes bind as methods, so `self` resolves correctly.
|
| 141 |
class _DepthCodec:
|
| 142 |
+
normalize_depth = _depth_latent.normalize_depth
|
| 143 |
+
encode_depth_to_latent = _depth_latent.encode_depth_to_latent
|
| 144 |
|
| 145 |
|
| 146 |
codec = _DepthCodec()
|
| 147 |
codec.vae = vae
|
| 148 |
codec.model_dtype = DTYPE
|
| 149 |
codec.device = DEVICE
|
| 150 |
+
encode_depth_to_latent = codec.encode_depth_to_latent
|
| 151 |
|
| 152 |
moge = None # lazy: bundled examples ship geometry.npz and never touch MoGe
|
| 153 |
|