remove pipeline hooks

This commit is contained in:
Aryan
2024-12-23 13:58:37 +01:00
parent 86e1d1888a
commit 5261bed284
+4
View File
@@ -814,6 +814,10 @@ class Trainer:
generator=self.state.generator, 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] prompt_filename = string_to_filename(prompt)[:25]
artifacts = { artifacts = {
"image": {"type": "image", "value": image}, "image": {"type": "image", "value": image},