File tree 2 files changed +1
-27
lines changed
2 files changed +1
-27
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { typedInclude } from "../utils/typedInclude";
8
8
export const inferenceProviderMappingCache = new Map < ModelId , InferenceProviderMapping > ( ) ;
9
9
10
10
export type InferenceProviderMapping = Partial <
11
- Record < InferenceProvider , Omit < InferenceProviderModelMapping , "hfModelId" | "adapterWeightsPath" > >
11
+ Record < InferenceProvider , Omit < InferenceProviderModelMapping , "hfModelId" > >
12
12
> ;
13
13
14
14
export interface InferenceProviderModelMapping {
@@ -74,22 +74,6 @@ export async function getInferenceProviderMapping(
74
74
`Model ${ params . modelId } is in staging mode for provider ${ params . provider } . Meant for test purposes only.`
75
75
) ;
76
76
}
77
- if ( providerMapping . adapter === "lora" ) {
78
- const treeResp = await ( options ?. fetch ?? fetch ) ( `${ HF_HUB_URL } /api/models/${ params . modelId } /tree/main` ) ;
79
- if ( ! treeResp . ok ) {
80
- throw new Error ( `Unable to fetch the model tree for ${ params . modelId } .` ) ;
81
- }
82
- const tree : Array < { type : "file" | "directory" ; path : string } > = await treeResp . json ( ) ;
83
- const adapterWeightsPath = tree . find ( ( { type, path } ) => type === "file" && path . endsWith ( ".safetensors" ) ) ?. path ;
84
- if ( ! adapterWeightsPath ) {
85
- throw new Error ( `No .safetensors file found in the model tree for ${ params . modelId } .` ) ;
86
- }
87
- return {
88
- ...providerMapping ,
89
- hfModelId : params . modelId ,
90
- adapterWeightsPath,
91
- } ;
92
- }
93
77
return { ...providerMapping , hfModelId : params . modelId } ;
94
78
}
95
79
return null ;
Original file line number Diff line number Diff line change @@ -86,16 +86,6 @@ export class FalAITextToImageTask extends FalAITask implements TextToImageTaskHe
86
86
...( params . args . parameters as Record < string , unknown > ) ,
87
87
sync_mode : true ,
88
88
prompt : params . args . inputs ,
89
- ...( params . mapping ?. adapter === "lora" && params . mapping . adapterWeightsPath
90
- ? {
91
- loras : [
92
- {
93
- path : buildLoraPath ( params . mapping . hfModelId , params . mapping . adapterWeightsPath ) ,
94
- scale : 1 ,
95
- } ,
96
- ] ,
97
- }
98
- : undefined ) ,
99
89
} ;
100
90
101
91
if ( params . mapping ?. adapter === "lora" && params . mapping . adapterWeightsPath ) {
You can’t perform that action at this time.
0 commit comments