From 78712f60a5a0f490f9d8d0d32b7930d6874489b7 Mon Sep 17 00:00:00 2001 From: Aryan Date: Mon, 23 Dec 2024 14:01:39 +0100 Subject: [PATCH] update comment --- finetrainers/ltx_video/ltx_video_lora.py | 5 ++++- finetrainers/trainer.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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