IC-Light Android ONNX
An ONNX model package optimized for running IC-Light image relighting locally on Android devices.
This repository provides the models required by the IC-Light Android app, including foreground extraction, text encoding, VAE encoding and decoding, and the IC-Light UNet. The models run with ONNX Runtime Android and use NNAPI to prioritize the NPU, DSP, or GPU available on the device.
Features
- On-device image relighting
- Text-guided lighting control
- Directional lighting control
- RMBG foreground extraction
- 512ร512 image processing
- FP16 inference
- Android NNAPI acceleration
- Automatic CPU fallback
- In-app model download
- Local folder import
Model Files
All files must remain in the repository root:
| File | Purpose | Approximate size |
|---|---|---|
iclight_clip.onnx |
CLIP text encoder graph | 167 KB |
iclight_clip.onnx.data |
CLIP weights | 235 MB |
iclight_vae_enc.onnx |
VAE encoder graph | 108 KB |
iclight_vae_enc.onnx.data |
VAE encoder weights | 65 MB |
iclight_unet_fc.onnx |
IC-Light UNet graph | 903 KB |
iclight_unet_fc.onnx.data |
IC-Light UNet weights | 1.6 GB |
iclight_vae_dec.onnx |
VAE decoder graph | 138 KB |
iclight_vae_dec.onnx.data |
VAE decoder weights | 94 MB |
rmbg.onnx |
RMBG foreground extraction graph | 700 KB |
rmbg.onnx.data |
RMBG weights | 168 MB |
The complete model package is approximately 2.2 GB.
Each .onnx file and its corresponding .onnx.data file must remain in the same directory. Do not rename them.
Automatic Download in the Android App
Enter the following Hugging Face repository ID in the IC-Light Android app:
xay2001/ic-light-android
Then select:
Download Models
The app supports:
- Download progress reporting
- Skipping completed files
- Resuming incomplete downloads
- Exact file-size validation
- Automatic model initialization after download
Models are stored at:
/sdcard/Android/data/com.example.ic_light/files/iclight_models/
At least 4โ5 GB of free storage is recommended.
Local Folder Import
You may also download the complete repository to your phone and select:
Import from Local Folder
Choose the directory containing all 10 model files. The app verifies that the required files are present before importing them into its private model directory.
Inference Pipeline
Input image
โ
RMBG foreground extraction
โ
Foreground compositing on a neutral background
โ
VAE encoder
โ
CLIP prompt encoder
โ
IC-Light UNet denoising
โ
VAE decoder
โ
Relighted image
Android Hardware Acceleration
The app requests hardware acceleration through the ONNX Runtime NNAPI Execution Provider:
- FP16 inference is enabled.
- On Android 10 and newer, the NNAPI reference CPU implementation is disabled.
- NNAPI prioritizes the NPU, DSP, or GPU exposed by the device.
- Unsupported operations fall back to ONNX Runtime CPU kernels.
- If NNAPI initialization fails, the app automatically falls back to CPU execution.
Actual NPU usage depends on the phoneโs SoC, Android version, NNAPI driver, and supported model operators.
The Android emulator cannot use the Mac Metal GPU for model inference. It is suitable for functional testing but not for measuring NPU performance.
Recommended Device Requirements
- Android 10 or newer
- ARM64 processor
- At least 8 GB of RAM
- At least 4โ5 GB of free storage
- A Snapdragon or MediaTek platform with NNAPI support
The IC-Light UNet is relatively large. Entry-level and mid-range devices may experience long loading times, high memory usage, or slow inference.
Direct Downloads
Individual files can be downloaded using:
https://huggingface.co/xay2001/ic-light-android/resolve/main/<filename>?download=true
Example:
https://huggingface.co/xay2001/ic-light-android/resolve/main/rmbg.onnx?download=true
Upstream Projects
This model package is based on or references the following projects:
Thanks to the original authors and the open-source community.
Licensing and Usage
This repository contains model artifacts converted and organized for Android inference. It does not relicense upstream models or software.
The IC-Light source repository is distributed under the Apache License 2.0. However, the underlying diffusion model, CLIP model, RMBG model, training data, and model weights may each be subject to separate licenses and usage restrictions.
Before using, modifying, or redistributing these files, review and comply with all applicable upstream licenses. Until commercial rights for every dependency are confirmed, research, educational, and non-commercial use is recommended.
Disclaimer
Model outputs may be inaccurate, inappropriate, or biased. Users are responsible for reviewing generated results and for ensuring that deployment and usage comply with applicable laws, licenses, and policies.