--- base_model: - black-forest-labs/FLUX.1-Kontext-dev datasets: - handsomeWilliam/Relation252K license: other license_name: nvidia-license-non-commercial license_link: LICENSE pipeline_tag: image-to-image --- # LoRWeB: Spanning the Visual Analogy Space with a Weight Basis of LoRAs
[![arXiv](https://img.shields.io/badge/arXiv-2602.15727-b31b1b.svg)](https://huggingface.co/papers/2602.15727) [![Project Website](https://img.shields.io/badge/🌐-Project%20Website-blue)](https://research.nvidia.com/labs/par/lorweb) [![GitHub Repository](https://img.shields.io/badge/GitHub-LoRWeB-black?logo=github)](https://github.com/NVlabs/LoRWeB) [![Evaluation Dataset](https://img.shields.io/badge/🤗-Evaluation%20Dataset-yellow)](https://huggingface.co/datasets/hilamanor/LoRWeB_evalset)
Visual analogy learning enables image manipulation through demonstration rather than textual description, allowing users to specify complex transformations difficult to articulate in words. Given a triplet {**a**, **a'**, **b**}, the goal is to generate **b'** such that **a** : **a'** :: **b** : **b'**. **LoRWeB** specializes the model for each analogy task at inference time through dynamic composition of learned transformation primitives. It introduces a learnable basis of LoRA modules to span the space of different visual transformations and a lightweight encoder that dynamically selects and weighs these basis LoRAs based on the input analogy pair.
**Hila Manor**1,2,  **Rinon Gal**2,  **Haggai Maron**1,2,  **Tomer Michaeli**1,  **Gal Chechik**2,3 1Technion - Israel Institute of Technology    2NVIDIA    3Bar-Ilan University
Teaser Given a prompt and an image triplet {**a**, **a'**, **b**} that visually describe a desired transformation, LoRWeB dynamically constructs a single LoRA from a learnable basis of LoRA modules, and produces an editing result **b'** that applies the same analogy to the new image.
## 🛠 Sample Usage To perform inference using the LoRWeB weights, use the `inference.py` script from the [official GitHub repository](https://github.com/NVlabs/LoRWeB): ```bash python inference.py \ -w "path/to/lorweb_model.safetensors" \ -c "config/your_config.yaml" \ -a "data/path_to_a_img.jpg" \ -t "data/path_to_atag_img.jpg" \ -b "data/path_to_b_img.jpg" \ -o "outputs/generated_btag_img_path.jpg" ``` ### â„šī¸ Additional Information **This model is a reproduction of the original model from the paper. It was trained from scratch using Technion resources.** This might introduce differences from the results reported in the paper. Please see the `samples` directory for examples of this model's outputs on the {**a**, **a'**, **b**} triplets from the teaser figure. Please see our full modelcard and further details in the [GitHub Repo](https://github.com/NVlabs/LoRWeB). ## 📚 Citation If you use this model in your research, please cite: ```bibtex @article{manor2026lorweb, title={Spanning the Visual Analogy Space with a Weight Basis of LoRAs}, author={Manor, Hila and Gal, Rinon and Maron, Haggai and Michaeli, Tomer and Chechik, Gal}, journal={arXiv preprint arXiv:2602.15727}, year={2026} } ``` ## 🙏đŸģ Acknowledgements This project builds upon: - [FLUX.1-Kontext](https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev) by Black Forest Labs - [Diffusers](https://github.com/huggingface/diffusers) by Hugging Face - [PEFT](https://github.com/huggingface/peft) by Hugging Face - [AI-Toolkit](https://github.com/ostris/ai-toolkit) for training infrastructure