Commit 1f38698
Run Flux LoRAs on Replicate (#1395)
This PR updates the `ReplicateTextToImageTask` method to support running
arbitrary LoRAs on Replicate.
How it works:
1. Detect LoRAs by their tags before inference.
2. Use https://replicate.com/black-forest-labs/flux-dev-lora for
inference
3. Use the requested LoRA as the `weights_url` input to the
flux-dev-lora model
## Companion PR
- replicate/huggingface-model-mappings#9
## Testing
Remove the `skip` from `describe.skip("InferenceClient" ...` in
InferenceClient.spec.ts
Then:
```
$ pnpx vitest run --config vitest.config.mts -t "Replicate"
```
---------
Co-authored-by: Simon Brandeis <[email protected]>
Co-authored-by: célina <[email protected]>
Co-authored-by: Lucain <[email protected]>1 parent 23d556f commit 1f38698
File tree
2 files changed
+26
-1
lines changed- packages/inference
- src/providers
- test
2 files changed
+26
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
66 | 80 | | |
67 | 81 | | |
68 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1160 | 1160 | | |
1161 | 1161 | | |
1162 | 1162 | | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
1163 | 1174 | | |
1164 | 1175 | | |
1165 | 1176 | | |
| |||
0 commit comments