Spaces:
Sleeping
Sleeping
Use precompiled AOTI transformer blocks (ZeroGPU speedup) (#1)
Browse files- Use precompiled AOTI transformer blocks (ZeroGPU speedup) (15e6fe3e754f03e0e97a9bea04f55b48aa9ff91e)
app.py
CHANGED
|
@@ -46,7 +46,11 @@ pipe.to("cuda")
|
|
| 46 |
pipe.vae.enable_tiling()
|
| 47 |
_lora_path = hf_hub_download(LORA_REPO, LORA_FILE, token=HF_TOKEN)
|
| 48 |
pipe.load_lora_weights(load_file(_lora_path), adapter_name="inpaint")
|
| 49 |
-
pipe.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
|
| 52 |
def _src_fps(path, default=FPS):
|
|
|
|
| 46 |
pipe.vae.enable_tiling()
|
| 47 |
_lora_path = hf_hub_download(LORA_REPO, LORA_FILE, token=HF_TOKEN)
|
| 48 |
pipe.load_lora_weights(load_file(_lora_path), adapter_name="inpaint")
|
| 49 |
+
pipe.fuse_lora(lora_scale=LORA_SCALE)
|
| 50 |
+
pipe.unload_lora_weights()
|
| 51 |
+
# AOTI: load precompiled transformer blocks at ROOT level (ZeroGPU loads on cuda at
|
| 52 |
+
# module scope; do NOT lazy-load or move to cuda inside @spaces.GPU).
|
| 53 |
+
spaces.aoti_load(module=pipe.transformer, repo_id="ltx-community/LTX-2.3-Transformer-GroupB-sm120-cu130-r0e")
|
| 54 |
|
| 55 |
|
| 56 |
def _src_fps(path, default=FPS):
|