mirror of
https://github.com/storytold/FineTrainers-Conditioning.git
synced 2026-10-29 09:07:10 +00:00
Full Finetuning for LTX possibily extended to other models. (#192)
* Full Finetuning for LTX possibily extended to other models. * Change name of the flag * Used disable grad for component on lora fine tuning enabled * Suggestions Addressed Renamed to SFT Added 2 other models. Testing required. * Switching to Full FineTuning * Run linter. * parse subfolder when needed. * tackle saving and loading hooks. * tackle validation. * fix subfolder bug. * remove __class__. * refactor * remove unnecessary changes * handle saving of final model weights correctly * remove unnecessary changes * LTX uses a default frame rate of 24 FPS We need to modify the output validation framerate to match that value. Add Framerate args. Add Update video output and inference frame rate * There was a results_args mapping that needed to be modified. * update * update README * Update README.md * update docs * add training configuration in cogvideox --------- Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> Co-authored-by: Aryan <aryan@huggingface.co> Co-authored-by: Aryan <contact.aryanvs@gmail.com>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
from .cogvideox_lora import COGVIDEOX_T2V_LORA_CONFIG
|
||||
from .full_finetune import COGVIDEOX_T2V_FULL_FINETUNE_CONFIG
|
||||
|
||||
@@ -311,6 +311,7 @@ def _pad_frames(latents: torch.Tensor, patch_size_t: int):
|
||||
return latents
|
||||
|
||||
|
||||
# TODO(aryan): refactor into model specs for better re-use
|
||||
COGVIDEOX_T2V_LORA_CONFIG = {
|
||||
"pipeline_cls": CogVideoXPipeline,
|
||||
"load_condition_models": load_condition_models,
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
from diffusers import CogVideoXPipeline
|
||||
|
||||
from .cogvideox_lora import (
|
||||
calculate_noisy_latents,
|
||||
collate_fn_t2v,
|
||||
forward_pass,
|
||||
initialize_pipeline,
|
||||
load_condition_models,
|
||||
load_diffusion_models,
|
||||
load_latent_models,
|
||||
post_latent_preparation,
|
||||
prepare_conditions,
|
||||
prepare_latents,
|
||||
validation,
|
||||
)
|
||||
|
||||
|
||||
# TODO(aryan): refactor into model specs for better re-use
|
||||
COGVIDEOX_T2V_FULL_FINETUNE_CONFIG = {
|
||||
"pipeline_cls": CogVideoXPipeline,
|
||||
"load_condition_models": load_condition_models,
|
||||
"load_latent_models": load_latent_models,
|
||||
"load_diffusion_models": load_diffusion_models,
|
||||
"initialize_pipeline": initialize_pipeline,
|
||||
"prepare_conditions": prepare_conditions,
|
||||
"prepare_latents": prepare_latents,
|
||||
"post_latent_preparation": post_latent_preparation,
|
||||
"collate_fn": collate_fn_t2v,
|
||||
"calculate_noisy_latents": calculate_noisy_latents,
|
||||
"forward_pass": forward_pass,
|
||||
"validation": validation,
|
||||
}
|
||||
Reference in New Issue
Block a user