fix: audio model use voxbox only
This commit is contained in:
@@ -247,7 +247,8 @@ const DataForm: React.FC<DataFormProps> = forwardRef((props, ref) => {
|
||||
|
||||
<FormInnerContext.Provider
|
||||
value={{
|
||||
onBackendChange: handleBackendChange
|
||||
onBackendChange: handleBackendChange,
|
||||
gpuOptions: gpuOptions
|
||||
}}
|
||||
>
|
||||
<HuggingFaceForm></HuggingFaceForm>
|
||||
|
||||
@@ -20,7 +20,6 @@ import {
|
||||
queryModelScopeModelFiles
|
||||
} from '../apis';
|
||||
import { backendOptionsMap, modelSourceMap } from '../config';
|
||||
import { checkOnlyAscendNPU } from '../hooks';
|
||||
import '../style/hf-model-file.less';
|
||||
import ModelFileItem from './model-file-item';
|
||||
import TitleWrapper from './title-wrapper';
|
||||
@@ -237,9 +236,7 @@ const HFModelFile: React.FC<HFModelFileProps> = forwardRef((props, ref) => {
|
||||
try {
|
||||
const evaluateFileList = list.map((item: any) => {
|
||||
return {
|
||||
backend: checkOnlyAscendNPU(gpuOptions || [])
|
||||
? backendOptionsMap.ascendMindie
|
||||
: backendOptionsMap.llamaBox,
|
||||
backend: backendOptionsMap.llamaBox,
|
||||
source: modelSource,
|
||||
...(modelSource === modelSourceMap.huggingface_value
|
||||
? {
|
||||
|
||||
@@ -21,11 +21,10 @@ import {
|
||||
ModelScopeSortType,
|
||||
ModelSortType,
|
||||
ModelscopeTaskMap,
|
||||
backendOptionsMap,
|
||||
modelSourceMap
|
||||
} from '../config';
|
||||
import { handleRecognizeAudioModel } from '../config/audio-catalog';
|
||||
import { checkOnlyAscendNPU } from '../hooks';
|
||||
import { checkCurrentbackend } from '../hooks';
|
||||
import SearchStyle from '../style/search-result.less';
|
||||
import SearchInput from './search-input';
|
||||
import SearchResult from './search-result';
|
||||
@@ -215,17 +214,15 @@ const SearchModel: React.FC<SearchInputProps> = (props) => {
|
||||
const res = handleRecognizeAudioModel(item, modelSource);
|
||||
|
||||
let backendObj = {};
|
||||
if (checkOnlyAscendNPU?.(gpuOptions || [])) {
|
||||
const backend = checkCurrentbackend({
|
||||
isGGUF: item.isGGUF,
|
||||
isAudio: res.isAudio,
|
||||
gpuOptions: gpuOptions || []
|
||||
});
|
||||
|
||||
if (backend) {
|
||||
backendObj = {
|
||||
backend: backendOptionsMap.ascendMindie
|
||||
};
|
||||
} else if (res.isAudio) {
|
||||
backendObj = {
|
||||
backend: backendOptionsMap.voxBox
|
||||
};
|
||||
} else if (item.isGGUF) {
|
||||
backendObj = {
|
||||
backend: backendOptionsMap.llamaBox
|
||||
backend: backend
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user