diff --git a/finetrainers/ltx_video/ltx_video_lora.py b/finetrainers/ltx_video/ltx_video_lora.py index e767f21..59a121f 100644 --- a/finetrainers/ltx_video/ltx_video_lora.py +++ b/finetrainers/ltx_video/ltx_video_lora.py @@ -151,7 +151,10 @@ def prepare_latents( else: h = vae._encode(image_or_video) _, _, num_frames, height, width = h.shape - # TODO(aryan): this is very very very stupid, but anything to make it work for now. refactor and design better later + + # TODO(aryan): This is very stupid that we might possibly be storing the latents_mean and latents_std in every file + # if precomputation is enabled. We should probably have a single file where re-usable properties like this are stored + # so as to reduce the disk memory requirements of the precomputed files. return { "latents": h, "num_frames": num_frames, diff --git a/finetrainers/trainer.py b/finetrainers/trainer.py index 80c2ebb..bc81b71 100644 --- a/finetrainers/trainer.py +++ b/finetrainers/trainer.py @@ -813,7 +813,7 @@ class Trainer: num_videos_per_prompt=self.args.num_validation_videos_per_prompt, generator=self.state.generator, ) - + # Remove all hooks that might have been added during pipeline initialization to the models pipeline.remove_all_hooks() del pipeline