mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-29 18:51:37 +00:00
Add support for training Z-Image Turbo with a de-distill training adapter
This commit is contained in:
@@ -205,6 +205,20 @@ export default function SimpleJob({
|
||||
placeholder=""
|
||||
required
|
||||
/>
|
||||
{modelArch?.additionalSections?.includes('model.assistant_lora_path') && (
|
||||
<TextInput
|
||||
label="Training Adapter Path"
|
||||
value={jobConfig.config.process[0].model.assistant_lora_path ?? ''}
|
||||
docKey="config.process[0].model.assistant_lora_path"
|
||||
onChange={(value: string | undefined) => {
|
||||
if (value?.trim() === '') {
|
||||
value = undefined;
|
||||
}
|
||||
setJobConfig(value, 'config.process[0].model.assistant_lora_path');
|
||||
}}
|
||||
placeholder=""
|
||||
/>
|
||||
)}
|
||||
{modelArch?.additionalSections?.includes('model.low_vram') && (
|
||||
<FormGroup label="Options">
|
||||
<Checkbox
|
||||
|
||||
@@ -23,7 +23,8 @@ type AdditionalSections =
|
||||
| 'model.multistage'
|
||||
| 'model.layer_offloading'
|
||||
| 'model.low_vram'
|
||||
| 'model.qie.match_target_res';
|
||||
| 'model.qie.match_target_res'
|
||||
| 'model.assistant_lora_path';
|
||||
type ModelGroup = 'image' | 'instruction' | 'video';
|
||||
|
||||
export interface ModelArch {
|
||||
@@ -496,6 +497,31 @@ export const modelArchs: ModelArch[] = [
|
||||
'model.qie.match_target_res',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'zimage:turbo',
|
||||
label: 'Z-Image Turbo (w/ Training Adapter)',
|
||||
group: 'image',
|
||||
defaults: {
|
||||
// default updates when [selected, unselected] in the UI
|
||||
'config.process[0].model.name_or_path': ['Tongyi-MAI/Z-Image-Turbo', defaultNameOrPath],
|
||||
'config.process[0].model.quantize': [true, false],
|
||||
'config.process[0].model.quantize_te': [true, false],
|
||||
'config.process[0].model.low_vram': [true, false],
|
||||
'config.process[0].train.unload_text_encoder': [false, false],
|
||||
'config.process[0].sample.sampler': ['flowmatch', 'flowmatch'],
|
||||
'config.process[0].train.noise_scheduler': ['flowmatch', 'flowmatch'],
|
||||
'config.process[0].train.timestep_type': ['weighted', 'sigmoid'],
|
||||
'config.process[0].model.qtype': ['qfloat8', 'qfloat8'],
|
||||
'config.process[0].model.assistant_lora_path': [
|
||||
'ostris/zimage_turbo_training_adapter/zimage_turbo_training_adapter_v1.safetensors',
|
||||
undefined,
|
||||
],
|
||||
'config.process[0].sample.guidance_scale': [1, 4],
|
||||
'config.process[0].sample.sample_steps': [8, 25],
|
||||
},
|
||||
disableSections: ['network.conv'],
|
||||
additionalSections: ['model.low_vram', 'model.layer_offloading', 'model.assistant_lora_path'],
|
||||
},
|
||||
].sort((a, b) => {
|
||||
// Sort by label, case-insensitive
|
||||
return a.label.localeCompare(b.label, undefined, { sensitivity: 'base' });
|
||||
|
||||
@@ -160,6 +160,7 @@ export interface ModelConfig {
|
||||
layer_offloading?: boolean;
|
||||
layer_offloading_transformer_percent?: number;
|
||||
layer_offloading_text_encoder_percent?: number;
|
||||
assistant_lora_path?: string;
|
||||
}
|
||||
|
||||
export interface SampleItem {
|
||||
|
||||
Reference in New Issue
Block a user