From c09b228a3598af0a3eaf0e829bffce1d0a1d5403 Mon Sep 17 00:00:00 2001 From: Jaret Burkett Date: Fri, 12 Jun 2026 11:02:10 -0600 Subject: [PATCH] Add model compiling to the ui --- ui/src/app/jobs/new/SimpleJob.tsx | 23 +++++++++++++++++++++-- ui/src/app/jobs/new/jobConfig.ts | 9 +++++++++ ui/src/types.ts | 6 ++++++ version.py | 2 +- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/ui/src/app/jobs/new/SimpleJob.tsx b/ui/src/app/jobs/new/SimpleJob.tsx index 4f16f05..6540ee4 100644 --- a/ui/src/app/jobs/new/SimpleJob.tsx +++ b/ui/src/app/jobs/new/SimpleJob.tsx @@ -9,7 +9,7 @@ import { jobTypeOptions, SampleTags, } from './options'; -import { defaultDatasetConfig } from './jobConfig'; +import { defaultCompileOptions, defaultDatasetConfig } from './jobConfig'; import { GroupedSelectOption, JobConfig, SelectOption } from '@/types'; import { objectCopy, tagsToObj, objToTags } from '@/utils/basic'; import { @@ -368,7 +368,7 @@ export default function SimpleJob({ )} {disableSections.includes('model.quantize') ? null : ( - + )} + + <> + + { + setJobConfig(value, 'config.process[0].train.compile'); + if (value) { + for (const key in defaultCompileOptions) { + setJobConfig((defaultCompileOptions as any)[key], `config.process[0].train.${key}`); + } + } else { + for (const key in defaultCompileOptions) { + setJobConfig(undefined, `config.process[0].train.${key}`); + } + } + }} + /> )} {modelArch?.additionalSections?.includes('model.multistage') && ( diff --git a/ui/src/app/jobs/new/jobConfig.ts b/ui/src/app/jobs/new/jobConfig.ts index 495259d..49f216c 100644 --- a/ui/src/app/jobs/new/jobConfig.ts +++ b/ui/src/app/jobs/new/jobConfig.ts @@ -31,6 +31,14 @@ export const defaultSliderConfig: SliderConfig = { anchor_class: '', }; +export const defaultCompileOptions = { + block_compile: false, + compile_mode: 'default', + compile_fullgraph: false, + compile_dynamic: false, + cache_size_limit: undefined, +}; + export const defaultJobConfig: JobConfig = { job: 'extension', config: { @@ -94,6 +102,7 @@ export const defaultJobConfig: JobConfig = { diff_output_preservation_class: 'person', switch_boundary_every: 1, loss_type: 'mse', + compile: false, }, logging: { log_every: 1, diff --git a/ui/src/types.ts b/ui/src/types.ts index fde0277..a3bf90e 100644 --- a/ui/src/types.ts +++ b/ui/src/types.ts @@ -151,6 +151,12 @@ export interface TrainConfig { differential_guidance_scale?: number; audio_loss_multiplier?: number; max_loss?: number | null; + compile?: boolean; + block_compile?: boolean; + compile_mode?: 'default' | 'max-autotune' | 'fastest'; + compile_fullgraph?: boolean; + compile_dynamic?: boolean; + cache_size_limit?: number; } export interface QuantizeKwargsConfig { diff --git a/version.py b/version.py index 1f0029c..b6f11d0 100644 --- a/version.py +++ b/version.py @@ -1 +1 @@ -VERSION = "0.10.6" +VERSION = "0.10.7"