From 5261bed284870b3f0d4c718a9c31612a4c0fe87d Mon Sep 17 00:00:00 2001 From: Aryan Date: Mon, 23 Dec 2024 13:58:37 +0100 Subject: [PATCH] remove pipeline hooks --- finetrainers/trainer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/finetrainers/trainer.py b/finetrainers/trainer.py index 23e55bc..80c2ebb 100644 --- a/finetrainers/trainer.py +++ b/finetrainers/trainer.py @@ -813,6 +813,10 @@ 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 prompt_filename = string_to_filename(prompt)[:25] artifacts = {