Spaces:
Running on Zero
Running on Zero
Commit ·
939d211
1
Parent(s): d330ff4
Drop VAE tiling cleanup (mutation is fork-local on ZeroGPU; parent state untouched)
Browse files
app.py
CHANGED
|
@@ -242,12 +242,11 @@ def generate(
|
|
| 242 |
H = W = int(resolution)
|
| 243 |
|
| 244 |
# Heavy resolutions push the VAE decode over the 48GB MIG budget — slice + tile.
|
| 245 |
-
|
| 246 |
if H >= 768:
|
| 247 |
try:
|
| 248 |
pipeline.vae.enable_tiling()
|
| 249 |
pipeline.vae.enable_slicing()
|
| 250 |
-
vae_tiling_enabled = True
|
| 251 |
except Exception as _e:
|
| 252 |
print(f"[pid] VAE tiling/slicing not available: {_e}", flush=True)
|
| 253 |
|
|
@@ -327,13 +326,6 @@ def generate(
|
|
| 327 |
gr.update(),
|
| 328 |
)
|
| 329 |
|
| 330 |
-
if vae_tiling_enabled:
|
| 331 |
-
try:
|
| 332 |
-
pipeline.vae.disable_tiling()
|
| 333 |
-
pipeline.vae.disable_slicing()
|
| 334 |
-
except Exception:
|
| 335 |
-
pass
|
| 336 |
-
|
| 337 |
# ---- Done: hide live preview, show the A/B slider ----
|
| 338 |
yield (
|
| 339 |
gr.update(visible=False, value=None),
|
|
|
|
| 242 |
H = W = int(resolution)
|
| 243 |
|
| 244 |
# Heavy resolutions push the VAE decode over the 48GB MIG budget — slice + tile.
|
| 245 |
+
# Mutating pipeline.vae here is fork-local (ZeroGPU forks per call) so no cleanup needed.
|
| 246 |
if H >= 768:
|
| 247 |
try:
|
| 248 |
pipeline.vae.enable_tiling()
|
| 249 |
pipeline.vae.enable_slicing()
|
|
|
|
| 250 |
except Exception as _e:
|
| 251 |
print(f"[pid] VAE tiling/slicing not available: {_e}", flush=True)
|
| 252 |
|
|
|
|
| 326 |
gr.update(),
|
| 327 |
)
|
| 328 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
# ---- Done: hide live preview, show the A/B slider ----
|
| 330 |
yield (
|
| 331 |
gr.update(visible=False, value=None),
|