Hila Manor commited on
Commit ·
0ef124c
1
Parent(s): ef019bb
model reproduction
Browse files- README.md +6 -4
- lorweb_model/config.yaml +86 -0
- lorweb_model/lorweb_model.safetensors +3 -0
- samples/architectural_car.jpg +0 -0
- samples/armor_doggy.jpg +0 -0
- samples/clay_man.jpg +0 -0
- samples/ghibli_cat.jpg +0 -0
README.md
CHANGED
|
@@ -8,10 +8,10 @@ base_model:
|
|
| 8 |
- black-forest-labs/FLUX.1-Kontext-dev
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# LoRWeB Model
|
| 12 |
|
| 13 |
<div align="center">
|
| 14 |
-
<a href="https://arxiv.org/">ArXiv</a> | <a href="https://github.com/NVlabs/LoRWeB" style="display:inline;text-decoration:underline;"><img width="20" height="20" style="display:inline;margin:0;" src="https://img.icons8.com/ios-glyphs/30/github.png" alt="github"> GitHub Repository</a> | <a href="https://research.nvidia.com/labs/par/lorweb"> 🌐 Project Website</a> | <a href="https://huggingface.co/datasets/hilamanor/LoRWeB_evalset">🤗 Evaluation Dataset
|
| 15 |
</div>
|
| 16 |
|
| 17 |
<div align="center">
|
|
@@ -31,7 +31,9 @@ base_model:
|
|
| 31 |
|
| 32 |
### ℹ️ Additional Information
|
| 33 |
|
| 34 |
-
Please see
|
|
|
|
|
|
|
| 35 |
|
| 36 |
## 📚 Citation
|
| 37 |
|
|
@@ -41,7 +43,7 @@ If you use this model in your research, please cite:
|
|
| 41 |
@article{manor2026lorweb,
|
| 42 |
title={Spanning the Visual Analogy Space with a Weight Basis of LoRAs},
|
| 43 |
author={Manor, Hila and Gal, Rinon and Maron, Haggai and Michaeli, Tomer and Chechik, Gal},
|
| 44 |
-
journal={arXiv preprint},
|
| 45 |
year={2026}
|
| 46 |
}
|
| 47 |
```
|
|
|
|
| 8 |
- black-forest-labs/FLUX.1-Kontext-dev
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# LoRWeB Model
|
| 12 |
|
| 13 |
<div align="center">
|
| 14 |
+
<a href="https://arxiv.org/abs/2602.15727">ArXiv</a> | <a href="https://github.com/NVlabs/LoRWeB" style="display:inline;text-decoration:underline;"><img width="20" height="20" style="display:inline;margin:0;" src="https://img.icons8.com/ios-glyphs/30/github.png" alt="github"> GitHub Repository</a> | <a href="https://research.nvidia.com/labs/par/lorweb"> 🌐 Project Website</a> | <a href="https://huggingface.co/datasets/hilamanor/LoRWeB_evalset">🤗 Evaluation Dataset</a>
|
| 15 |
</div>
|
| 16 |
|
| 17 |
<div align="center">
|
|
|
|
| 31 |
|
| 32 |
### ℹ️ Additional Information
|
| 33 |
|
| 34 |
+
**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.
|
| 35 |
+
|
| 36 |
+
Please see our full modelcard and further details in the [GitHub Repo](https://github.com/NVlabs/LoRWeB).
|
| 37 |
|
| 38 |
## 📚 Citation
|
| 39 |
|
|
|
|
| 43 |
@article{manor2026lorweb,
|
| 44 |
title={Spanning the Visual Analogy Space with a Weight Basis of LoRAs},
|
| 45 |
author={Manor, Hila and Gal, Rinon and Maron, Haggai and Michaeli, Tomer and Chechik, Gal},
|
| 46 |
+
journal={arXiv preprint arXiv:2602.15727},
|
| 47 |
year={2026}
|
| 48 |
}
|
| 49 |
```
|
lorweb_model/config.yaml
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
job: extension
|
| 2 |
+
config:
|
| 3 |
+
name: lorweb_model
|
| 4 |
+
process:
|
| 5 |
+
- type: sd_trainer
|
| 6 |
+
training_folder: output
|
| 7 |
+
device: cuda:0
|
| 8 |
+
network:
|
| 9 |
+
type: attlora
|
| 10 |
+
linear: 4
|
| 11 |
+
linear_alpha: 4
|
| 12 |
+
network_kwargs:
|
| 13 |
+
lora_keys_dim: 128
|
| 14 |
+
lora_heads: 1
|
| 15 |
+
mixing_coeffs_type: mean
|
| 16 |
+
external_query: true
|
| 17 |
+
pooling_type: avg
|
| 18 |
+
query_projection_type: linear
|
| 19 |
+
external_query_model: openai/clip-vit-large-patch14
|
| 20 |
+
loras_num: 32
|
| 21 |
+
lora_softmax: true
|
| 22 |
+
query_mode: cat-aa'b
|
| 23 |
+
save:
|
| 24 |
+
dtype: float16
|
| 25 |
+
save_every: 250
|
| 26 |
+
max_step_saves_to_keep: 4
|
| 27 |
+
push_to_hub: false
|
| 28 |
+
datasets:
|
| 29 |
+
- folder_path: ./data/relation252k_processed/target
|
| 30 |
+
control_path: ./data/relation252k_processed/control
|
| 31 |
+
caption_ext: txt
|
| 32 |
+
caption_dropout_rate: 0.05
|
| 33 |
+
shuffle_tokens: false
|
| 34 |
+
cache_latents_to_disk: false
|
| 35 |
+
resolution:
|
| 36 |
+
- 512
|
| 37 |
+
is_analogy: false
|
| 38 |
+
is_box_analogy: true
|
| 39 |
+
full_size_control_images: true
|
| 40 |
+
enable_relation_captions: true
|
| 41 |
+
is_bidirectional_analogy: false
|
| 42 |
+
train:
|
| 43 |
+
batch_size: 6
|
| 44 |
+
steps: 10000
|
| 45 |
+
gradient_accumulation_steps: 1
|
| 46 |
+
train_unet: true
|
| 47 |
+
train_text_encoder: false
|
| 48 |
+
gradient_checkpointing: true
|
| 49 |
+
noise_scheduler: flowmatch
|
| 50 |
+
optimizer: adamw8bit
|
| 51 |
+
optimizer_params:
|
| 52 |
+
betas:
|
| 53 |
+
- 0.9
|
| 54 |
+
- 0.99
|
| 55 |
+
weight_decay: 0.05
|
| 56 |
+
lr: 0.001
|
| 57 |
+
timestep_type: weighted
|
| 58 |
+
dtype: bf16
|
| 59 |
+
debug_save_target_images: true
|
| 60 |
+
model:
|
| 61 |
+
name_or_path: black-forest-labs/FLUX.1-Kontext-dev
|
| 62 |
+
arch: flux_kontext
|
| 63 |
+
quantize: true
|
| 64 |
+
sample:
|
| 65 |
+
sampler: flowmatch
|
| 66 |
+
sample_every: 500
|
| 67 |
+
width: 1024
|
| 68 |
+
height: 1024
|
| 69 |
+
prompts:
|
| 70 |
+
- Transform the photo into a stylized illustration. --ctrl_img ./data/relation252k_processed/control/analogy_MJ_Style11827_1.png_MJ_Style11827_2.png_0000.jpg
|
| 71 |
+
neg: ''
|
| 72 |
+
seed: 42
|
| 73 |
+
walk_seed: true
|
| 74 |
+
guidance_scale: 4
|
| 75 |
+
sample_steps: 20
|
| 76 |
+
is_analogy: false
|
| 77 |
+
is_box_analogy: true
|
| 78 |
+
logging:
|
| 79 |
+
use_wandb: true
|
| 80 |
+
log_every: 1
|
| 81 |
+
project_name: lorweb
|
| 82 |
+
verbose: false
|
| 83 |
+
run_name: lorweb_model
|
| 84 |
+
meta:
|
| 85 |
+
name: LoRWeB_default_PROMPTS
|
| 86 |
+
version: '1.0'
|
lorweb_model/lorweb_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d67e997fc45f2535f1947a29079ea87b6af2ac3a18732f26648f94ca91f308c4
|
| 3 |
+
size 1670370808
|
samples/architectural_car.jpg
ADDED
|
samples/armor_doggy.jpg
ADDED
|
samples/clay_man.jpg
ADDED
|
samples/ghibli_cat.jpg
ADDED
|