replicate-javascript icon indicating copy to clipboard operation
replicate-javascript copied to clipboard

How to add LORA/weight to replicate-javascript?

Open Pickra opened this issue 2 years ago • 2 comments

Hey, I'm a noob so please be gentle.

I want to add LORA/weight to an instance of SDXL.

I'm using replicate-javascript to run an SDXL model. I trained a different instance of SDXL on replicate.com and downloaded the weights. How do I add the weights/LORA via replicate-javascript? Or there's no docs for this because that's not how it works?

Thank you.

Pickra avatar Jan 03 '24 01:01 Pickra

Hi @Pickra. If you fine-tuned SDXL on Replicate, you can run that model directly. Here's a comprehensive guide for how all of that works: https://replicate.com/blog/fine-tune-sdxl

mattt avatar Jan 03 '24 16:01 mattt

Thanks for getting back to me @mattt !

I'm aware I can run the model on replicate. I want to train for multiple types of fantasy characters. The SDXL base instance is giving me poor results, but the training gets good results.

I could retrain the same model and not have to worry about the LORAs but I thought the best approach was to create/train multiple LORAs and apply them to 1 instance of SDXL. It's possible I'm misunderstanding or am unaware of the optimal way to get trained results for multiple types of fantasy characters.

Please advise. Thank you.

Pickra avatar Jan 03 '24 20:01 Pickra

@Pickra Sorry for the late response. There are models on Replicate that support multiple LoRAs, such as lucataco/flux-dev-multi-lora. You should be able to fine-tune FLUX multiple times for different subjects and combine them in a single run.

mattt avatar Sep 16 '24 07:09 mattt