This is no longer needed

This commit is contained in:
Brandon Rising 2023-07-27 10:52:36 -04:00
parent f7bb4c3f05
commit a491e326c5

View File

@ -1,31 +0,0 @@
import { logger } from 'app/logging/logger';
import {
OnnxModelParam,
zMainModel,
} from 'features/parameters/types/parameterSchemas';
export const modelIdToOnnxModelParam = (
mainModelId: string
): OnnxModelParam | undefined => {
const log = logger('models');
const [base_model, model_type, model_name] = mainModelId.split('/');
const result = zMainModel.safeParse({
base_model,
model_name,
model_type,
});
if (!result.success) {
log.error(
{
mainModelId,
errors: result.error.format(),
},
'Failed to parse main model id'
);
return;
}
return result.data;
};