File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
packages/inference/src/providers Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,22 @@ export class FalAIImageToImageTask extends FalAiQueueTask implements ImageToImag
215215 return `/${ params . model } ` ;
216216 }
217217
218+ override preparePayload ( params : BodyParams ) : Record < string , unknown > {
219+ const payload = params . args ;
220+ if ( params . mapping ?. adapter === "lora" && params . mapping . adapterWeightsPath ) {
221+ payload . loras = [
222+ {
223+ path : buildLoraPath ( params . mapping . hfModelId , params . mapping . adapterWeightsPath ) ,
224+ scale : 1 ,
225+ } ,
226+ ] ;
227+ if ( params . mapping . providerId === "fal-ai/lora" ) {
228+ payload . model_name = "stabilityai/stable-diffusion-xl-base-1.0" ;
229+ }
230+ }
231+ return payload ;
232+ }
233+
218234 async preparePayloadAsync ( args : ImageToImageArgs ) : Promise < RequestArgs > {
219235 const mimeType = args . inputs instanceof Blob ? args . inputs . type : "image/png" ;
220236 return {
You can’t perform that action at this time.
0 commit comments