Add auto_frame_count support for all remaining video models (#897)
This commit is contained in:
parent
022d1c29e0
commit
4af4fb9d58
|
|
@ -181,9 +181,10 @@ export const modelArchs: ModelArch[] = [
|
|||
'config.process[0].train.noise_scheduler': ['flowmatch', 'flowmatch'],
|
||||
'config.process[0].sample.num_frames': [41, 1],
|
||||
'config.process[0].sample.fps': [16, 1],
|
||||
'config.process[0].datasets[x].fps': [16, undefined],
|
||||
},
|
||||
disableSections: ['network.conv'],
|
||||
additionalSections: ['datasets.num_frames', 'model.low_vram'],
|
||||
additionalSections: ['datasets.num_frames', 'model.low_vram', 'datasets.auto_frame_count'],
|
||||
},
|
||||
{
|
||||
name: 'wan21_i2v:14b480p',
|
||||
|
|
@ -200,9 +201,10 @@ export const modelArchs: ModelArch[] = [
|
|||
'config.process[0].sample.num_frames': [41, 1],
|
||||
'config.process[0].sample.fps': [16, 1],
|
||||
'config.process[0].train.timestep_type': ['weighted', 'sigmoid'],
|
||||
'config.process[0].datasets[x].fps': [16, undefined],
|
||||
},
|
||||
disableSections: ['network.conv'],
|
||||
additionalSections: ['sample.ctrl_img', 'datasets.num_frames', 'model.low_vram'],
|
||||
additionalSections: ['sample.ctrl_img', 'datasets.num_frames', 'model.low_vram', 'datasets.auto_frame_count'],
|
||||
},
|
||||
{
|
||||
name: 'wan21_i2v:14b',
|
||||
|
|
@ -219,9 +221,10 @@ export const modelArchs: ModelArch[] = [
|
|||
'config.process[0].sample.num_frames': [41, 1],
|
||||
'config.process[0].sample.fps': [16, 1],
|
||||
'config.process[0].train.timestep_type': ['weighted', 'sigmoid'],
|
||||
'config.process[0].datasets[x].fps': [16, undefined],
|
||||
},
|
||||
disableSections: ['network.conv'],
|
||||
additionalSections: ['sample.ctrl_img', 'datasets.num_frames', 'model.low_vram'],
|
||||
additionalSections: ['sample.ctrl_img', 'datasets.num_frames', 'model.low_vram', 'datasets.auto_frame_count'],
|
||||
},
|
||||
{
|
||||
name: 'wan21:14b',
|
||||
|
|
@ -237,9 +240,10 @@ export const modelArchs: ModelArch[] = [
|
|||
'config.process[0].train.noise_scheduler': ['flowmatch', 'flowmatch'],
|
||||
'config.process[0].sample.num_frames': [41, 1],
|
||||
'config.process[0].sample.fps': [16, 1],
|
||||
'config.process[0].datasets[x].fps': [16, undefined],
|
||||
},
|
||||
disableSections: ['network.conv'],
|
||||
additionalSections: ['datasets.num_frames', 'model.low_vram'],
|
||||
additionalSections: ['datasets.num_frames', 'model.low_vram', 'datasets.auto_frame_count'],
|
||||
},
|
||||
{
|
||||
name: 'wan22_14b:t2v',
|
||||
|
|
@ -257,6 +261,7 @@ export const modelArchs: ModelArch[] = [
|
|||
'config.process[0].sample.fps': [16, 1],
|
||||
'config.process[0].model.low_vram': [true, false],
|
||||
'config.process[0].train.timestep_type': ['linear', 'sigmoid'],
|
||||
'config.process[0].datasets[x].fps': [16, undefined],
|
||||
'config.process[0].model.model_kwargs': [
|
||||
{
|
||||
train_high_noise: true,
|
||||
|
|
@ -266,7 +271,7 @@ export const modelArchs: ModelArch[] = [
|
|||
],
|
||||
},
|
||||
disableSections: ['network.conv'],
|
||||
additionalSections: ['datasets.num_frames', 'model.low_vram', 'model.multistage', 'model.layer_offloading'],
|
||||
additionalSections: ['datasets.num_frames', 'model.low_vram', 'model.multistage', 'model.layer_offloading', 'datasets.auto_frame_count'],
|
||||
accuracyRecoveryAdapters: {
|
||||
// '3 bit with ARA': 'uint3|ostris/accuracy_recovery_adapters/wan22_14b_t2i_torchao_uint3.safetensors',
|
||||
'4 bit with ARA': 'uint4|ostris/accuracy_recovery_adapters/wan22_14b_t2i_torchao_uint4.safetensors',
|
||||
|
|
@ -288,6 +293,7 @@ export const modelArchs: ModelArch[] = [
|
|||
'config.process[0].sample.fps': [16, 1],
|
||||
'config.process[0].model.low_vram': [true, false],
|
||||
'config.process[0].train.timestep_type': ['linear', 'sigmoid'],
|
||||
'config.process[0].datasets[x].fps': [16, undefined],
|
||||
'config.process[0].model.model_kwargs': [
|
||||
{
|
||||
train_high_noise: true,
|
||||
|
|
@ -303,6 +309,7 @@ export const modelArchs: ModelArch[] = [
|
|||
'model.low_vram',
|
||||
'model.multistage',
|
||||
'model.layer_offloading',
|
||||
'datasets.auto_frame_count',
|
||||
],
|
||||
accuracyRecoveryAdapters: {
|
||||
'4 bit with ARA': 'uint4|ostris/accuracy_recovery_adapters/wan22_14b_i2v_torchao_uint4.safetensors',
|
||||
|
|
@ -327,9 +334,10 @@ export const modelArchs: ModelArch[] = [
|
|||
'config.process[0].sample.height': [768, 1024],
|
||||
'config.process[0].train.timestep_type': ['weighted', 'sigmoid'],
|
||||
'config.process[0].datasets[x].do_i2v': [true, undefined],
|
||||
'config.process[0].datasets[x].fps': [24, undefined],
|
||||
},
|
||||
disableSections: ['network.conv'],
|
||||
additionalSections: ['sample.ctrl_img', 'datasets.num_frames', 'model.low_vram', 'datasets.do_i2v'],
|
||||
additionalSections: ['sample.ctrl_img', 'datasets.num_frames', 'model.low_vram', 'datasets.do_i2v', 'datasets.auto_frame_count'],
|
||||
},
|
||||
{
|
||||
name: 'lumina2',
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ export const handleModelArchChange = (
|
|||
const hasControlPath = newArch?.additionalSections?.includes('datasets.control_path') || false;
|
||||
const hasMultiControlPaths = newArch?.additionalSections?.includes('datasets.multi_control_paths') || false;
|
||||
const hasNumFrames = newArch?.additionalSections?.includes('datasets.num_frames') || false;
|
||||
const hasAutoFrameCount = newArch?.additionalSections?.includes('datasets.auto_frame_count') || false;
|
||||
const controls = newArch?.controls ?? [];
|
||||
const datasets = jobConfig.config.process[0].datasets.map(dataset => {
|
||||
const newDataset = objectCopy(dataset);
|
||||
|
|
@ -120,6 +121,9 @@ export const handleModelArchChange = (
|
|||
if (!hasNumFrames) {
|
||||
newDataset.num_frames = 1; // reset num_frames if not applicable
|
||||
}
|
||||
if (!hasAutoFrameCount) {
|
||||
delete newDataset.auto_frame_count;
|
||||
}
|
||||
return newDataset;
|
||||
});
|
||||
setJobConfig(datasets, 'config.process[0].datasets');
|
||||
|
|
|
|||
Loading…
Reference in New Issue