Spaces:
Running on Zero
Running on Zero
File size: 1,624 Bytes
fdcf7c0 c2f7f7c fdcf7c0 16979c7 fdcf7c0 bc275c2 fdcf7c0 860c112 bc275c2 860c112 bc275c2 860c112 bc275c2 860c112 bc275c2 860c112 bc275c2 860c112 bc275c2 860c112 bc275c2 860c112 bc275c2 860c112 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ---
title: InstantRetouch
sdk: gradio
sdk_version: "4.44.1"
python_version: "3.10"
app_file: app.py
pinned: false
license: other
---
# InstantRetouch / IP2P-BiLA Demo
Public Hugging Face ZeroGPU demo for instruction-guided image retouching with the validation-selected IP2P/BiLA checkpoint.
- Model: IP2P/BiLA
- UI: image upload, optional instruction, seed, max side, strength, and selectable examples
This Space is isolated from the research repository. It does not import `agent/`, training scripts, or local experiment paths at runtime. Weights live in a separate Hugging Face model repo and are downloaded lazily through `BILA_WEIGHTS_REPO`.
## Required Space Variables
Set one of these in the Space environment:
- `BILA_WEIGHTS_REPO`: Hugging Face model repo containing the IP2P weight layout below.
- `BILA_MODEL_ROOT`: local path with the same layout, useful only for staging/debugging.
Optional:
- `HF_TOKEN`: required if `BILA_WEIGHTS_REPO` is private.
- `BILA_MODEL_CACHE`: cache location. If unset, the app uses `/data/bila-space-demo/hf-cache` when persistent storage exists, otherwise `/tmp/bila-space-demo/hf-cache`.
## Weight Repo Layout
Do not commit weights into this Space repo. Put them in a separate HF model repo:
```text
ip2p/
base/
tokenizer/
text_encoder/
vae/
unet/
checkpoints/
<bila-checkpoint>.pth
metrics/
<metric-summary>.json
```
The app follows the validation-style direct flow: load the IP2P base model, load the BiLA checkpoint named in `model_manifest.json`, generate `bila_output`, then apply strength as `input + strength * (bila_output - input)`.
|