mirror of
https://github.com/storytold/FineTrainers-Conditioning.git
synced 2026-10-18 00:33:52 +00:00
fix validation bug (#149)
This commit is contained in:
@@ -813,10 +813,6 @@ 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},
|
||||||
@@ -857,6 +853,10 @@ class Trainer:
|
|||||||
if tracker.name == "wandb":
|
if tracker.name == "wandb":
|
||||||
tracker.log({"validation": all_artifacts}, step=step)
|
tracker.log({"validation": all_artifacts}, step=step)
|
||||||
|
|
||||||
|
# Remove all hooks that might have been added during pipeline initialization to the models
|
||||||
|
pipeline.remove_all_hooks()
|
||||||
|
del pipeline
|
||||||
|
|
||||||
accelerator.wait_for_everyone()
|
accelerator.wait_for_everyone()
|
||||||
|
|
||||||
free_memory()
|
free_memory()
|
||||||
|
|||||||
Reference in New Issue
Block a user