ImageBind icon indicating copy to clipboard operation
ImageBind copied to clipboard

Finetuning ImageBind with LoRA

Open fabawi opened this issue 1 year ago • 7 comments

I created a simple ImageBind finetuning example using LoRA: https://github.com/fabawi/ImageBind-LoRA

Make sure you clone it recursively to include the example dataset: git clone --recurse-submodules -j8 [email protected]:fabawi/ImageBind-LoRA.git

Install the requirements following the instructions provided in this repo, and run train.py

This should log your checkpoints, as well as separate LoRA if you'd like to update the original model without saving all the model params. More examples and finer control to be added soon

fabawi avatar May 13 '23 12:05 fabawi

Can I know how you run the model to generate images?

WilTay1 avatar May 14 '23 03:05 WilTay1

^^^ upvoting WilTay1's question. also wondering if you know how to train ImageBind without using LoRA?

ChloeL19 avatar May 16 '23 17:05 ChloeL19

^^^ upvoting WilTay1's question. also wondering if you know how to train ImageBind without using LoRA?

@ChloeL19 you can train the model without LoRA using ImageBind-LoRA. Simply remove the --lora argument when calling train.py and set --full_model_checkpointing. I don't have the resources to fine-tune it but it should work in theory. Try it out on the toy dataset provided in the repo, and later you can try to implement dataloaders for the original datasets

fabawi avatar May 16 '23 18:05 fabawi

Great, thank you so much! I'll keep you posted depending on how far I get.

ChloeL19 avatar May 16 '23 18:05 ChloeL19

Can I know how you run the model to generate images?

late, but there are many repositories that just replace CLIP for ImageBind A good example is https://github.com/Birch-san/imagebind-guided-diffusion

chavinlo avatar Jun 03 '23 23:06 chavinlo

Nice work. Thanks Could you a little explain why you used LoRA. Did the paper use it?

K-M-Ibrahim-Khalilullah avatar Jul 21 '23 18:07 K-M-Ibrahim-Khalilullah

There is a repo that uses LoRA to bind modalities to language.

llziss4ai avatar Oct 14 '23 08:10 llziss4ai