// Create grouped options for a select menu
function getModelOptions() {
return Object.entries(OpenComicAI.modelsTypeList).map(([type, models]) => ({
label: type.charAt(0).toUpperCase() + type.slice(1),
options: models.map(key => ({
value: key,
label: OpenComicAI.models[type][key].name
}))
}));
}
const options = getModelOptions();
// [
// { label: 'Upscale', options: [{ value: 'realcugan', label: 'RealCUGAN' }, ...] },
// { label: 'Descreen', options: [...] },
// { label: 'Artifact-removal', options: [...] }
// ]