mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-05 07:48:45 +00:00
- apps/host: the DeepSeek card, note, Speed (DeepSeek) setting, context list, picture tower, engine options, the "DeepSeek" engine family and its update line go (server/dsv41-context.mjs, server/native-ds-args.mjs, src/lib/deepseek-context.ts, src/lib/deepseek-speed.ts deleted; native-control, native-settings, engine-library, native-vision, GuidedSetup, NativeModels, NativeSettings, VersionPicker, EngineUpdateCard, PcFitCard, engine-list, native-catalog, default-context, native.ts edited). withoutVisionFlag, used by the Qwen path, moves into native-control.mjs unchanged. - A model Control lists as retired (strata_control/models.py, commit 2) shows on the Models screen with its line (the owner's D2) and cannot be loaded: loadEngine stops with Control's refusal (D1) before any fetch, file write or start; the Manage list and Settings > Storage leave it out (their delete removes files). plain-errors.ts shows the refusal as Control wrote it, with the approved next step (English; translations come with the owner's word). The host's autostart clears a remembered DeepSeek model and logs the refusal instead of trying to load it. - The "DeepSeek speed-ups" switch leaves strata_control/speed_switches.py (a DeepSeek config gets no switch); app_policy.py loses the DeepSeek rows; policy-generated.mjs and tests/data/policy-vectors.json regenerated with `python -m strata_control.app_policy`. - Locales: the 16 DeepSeek-only keys leave all nine languages (fx62-fx69, fx72, fx75, fx77, fx78, fx80, fx81, vp03). DeepSeek as a cloud provider / search key and the DeepSeek Harness are untouched (owner). - Tests: the six DeepSeek-only app test files go; the DeepSeek cases of the shared ones become "listed as retired, refused, nothing saved or started"; test_speed_switches.py loses the DeepSeek switch rows.
24 lines
1.5 KiB
JavaScript
24 lines
1.5 KiB
JavaScript
/** Prepared vision files stay in the source config; activation belongs to a loaded instance. */
|
||
export function runtimeVision(config,requested){
|
||
const mode=requested??(config.ui_vision_enabled===false?'no':config.ui_vision_device);
|
||
if(mode!==undefined&&!['yes','no','cpu','gpu'].includes(mode))throw new Error('Choose whether to enable picture reading.');
|
||
if(mode==='no')return undefined;
|
||
if(mode===undefined)return config.vision;
|
||
if(!config.vision)throw new Error('Prepare this model’s vision files before enabling picture reading.');
|
||
if(mode==='cpu'&&config.vision.cpu_exe){const {cpu_exe,...rest}=config.vision;return {...rest,exe:cpu_exe,gpu:false};} // AMD: the CPU reader program, not the HIP one with the GPU hidden
|
||
return {...config.vision,...(mode==='cpu'?{gpu:false}:mode==='gpu'?{gpu:true}:{})};
|
||
}
|
||
|
||
/**
|
||
* The catalog with each picture-capable size marked as ready (`images`) or not (`imagesCapable` stays true either way). The Qwen engines
|
||
* read pictures with a separate program (strata-vision) that has to sit in the engine folder.
|
||
*/
|
||
export function markPictures(catalog,visionReader){
|
||
if(!catalog||!Array.isArray(catalog.families))return catalog;
|
||
const ready=(s)=>!!s.images&&visionReader===true;
|
||
return {...catalog,families:catalog.families.map(f=>{
|
||
const sizes=(f.sizes??[]).map(s=>({...s,imagesCapable:!!s.images,images:ready(s)}));
|
||
return {...f,imagesCapable:!!f.images,images:sizes.length?sizes.some(s=>s.images):!!f.images&&visionReader===true,sizes};
|
||
})};
|
||
}
|