- native state: the host's 'native' events are applied at once; the light poll (1 s while a job runs, none while hidden) is no longer held by a slow forced read; a read that never answers is dropped after 20 s - install progress: every file of the model is counted (parts, picture reader beside the model folders, NVFP4 packs by their pinned sizes); the bar no longer sits at 99 % while the picture reader downloads; the screen names the part (part 2 of 4) and lists the parts - a config is 'ready' only when every part of a multi-part GGUF is whole - Models page keeps version, context, computer use, picture reading and expert choices across tabs; Read pictures is on for a version that is not downloaded yet; the running download is named - version list: smaller rows, a Downloaded tag, NVFP4 / NVFP4-NVIDIA / NVFP4-QAD named by who made them with one line each - first-run page: the four recommended versions, then a More versions list (the Models page list)
23 lines
2.0 KiB
TypeScript
23 lines
2.0 KiB
TypeScript
import type {NativeFamily,NativeSize} from './native';
|
|
import {tr} from './i18n';
|
|
import {nvfp4Version} from './native-names';
|
|
export interface CatalogVersion extends NativeSize{sourceFamily:string;edition:string;images:boolean}
|
|
export interface CatalogModel extends Omit<NativeFamily,'sizes'>{sizes:CatalogVersion[]}
|
|
export function nativeVersionLabel(model:string){const nv=nvfp4Version(model);if(nv)return tr(nv.name);return tr(({Q2_0:'Fastest',IQ2_XS:'Compact',IQ3_XXS:'Balanced',IQ3_S:'High quality',IQ1_M:'Coding','Gyro-S':'Smallest','Gyro-M':'Small memory'} as Record<string,string>)[model]??model);}
|
|
export const catalogVersionLabel=(version:CatalogVersion)=>{const label=nativeVersionLabel(version.model);return [tr(version.edition),label===version.model&&version.edition?'':label].filter(Boolean).join(' · ');};
|
|
/** The one line that says how a version differs from its neighbours (the three NVFP4 versions); empty for the rest. */
|
|
export const versionNote=(model:string)=>{const nv=nvfp4Version(model);return nv?tr(nv.note):'';};
|
|
/** Display groups are distinct from the engine's installation family IDs. */
|
|
export function nativeCatalogModels(families:NativeFamily[]):CatalogModel[]{
|
|
if(!families.length)return[];
|
|
const groups:CatalogModel[]=[{family:'qwen3.8',title:'Qwen3.8-Flash-Next',about:'',experimental:false,images:false,sizes:[]},{family:'qwen3.6',title:'Qwen3.6-35B-A3B',about:'',experimental:false,images:false,sizes:[]}];
|
|
for(const family of families){
|
|
const target=/qwen3[._-]?6|35b[-_]?a3b/i.test(family.title+' '+family.family)?groups[1]:['qwen','swift','coder','unsloth','gyro'].includes(family.family)||/qwen3[._-]?8|flash.next/i.test(family.title)?groups[0]:undefined;
|
|
if(!target)continue;
|
|
const edition=target===groups[0]?({swift:'Swift 1.5',coder:'Coder',unsloth:'Unsloth',gyro:'Gyro'} as Record<string,string>)[family.family]??'':'';
|
|
target.images ||= family.images;
|
|
target.sizes.push(...family.sizes.map(size=>({...size,sourceFamily:family.family,edition,images:family.images})));
|
|
}
|
|
return groups;
|
|
}
|