mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
This is no longer needed
This commit is contained in:
parent
f7bb4c3f05
commit
a491e326c5
@ -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;
|
||||
};
|
Loading…
Reference in New Issue
Block a user