From 523c1595794e91b7cc357193e99e5d2fcb77c5af Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Thu, 24 Jul 2025 07:02:46 -0600 Subject: [PATCH] Add vram flag to some models in the ui --- ui/src/app/jobs/new/SimpleJob.tsx | 19 +++++++++++++++++-- ui/src/app/jobs/new/options.ts | 10 +++++----- version.py | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ui/src/app/jobs/new/SimpleJob.tsx b/ui/src/app/jobs/new/SimpleJob.tsx index 52f6454a..9d192f67 100644 --- a/ui/src/app/jobs/new/SimpleJob.tsx +++ b/ui/src/app/jobs/new/SimpleJob.tsx @@ -86,13 +86,19 @@ export default function SimpleJob({ if (!currentArch || currentArch.name === value) { return; } + // update the defaults when a model is selected + const newArch = modelArchs.find(model => model.name === value); + + // update vram setting + if (!(newArch?.additionalSections?.includes('model.low_vram'))) { + setJobConfig(false, 'config.process[0].model.low_vram'); + } // revert defaults from previous model for (const key in currentArch.defaults) { setJobConfig(currentArch.defaults[key][1], key); } - // update the defaults when a model is selected - const newArch = modelArchs.find(model => model.name === value); + if (newArch?.defaults) { for (const key in newArch.defaults) { setJobConfig(newArch.defaults[key][0], key); @@ -160,6 +166,15 @@ export default function SimpleJob({ )} + {modelArch?.additionalSections?.includes('model.low_vram') && ( + + setJobConfig(value, 'config.process[0].model.low_vram')} + /> + + )}