Merge pull request #383 from LittleNyima/fix-deprecation

fix deprecation of clear_objs_and_retain_memory
This commit is contained in:
Yuxuan.Zhang 2024-10-01 17:02:53 +08:00 committed by GitHub
commit a9a55462f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,7 @@ from diffusers.optimization import get_scheduler
from diffusers.pipelines.cogvideo.pipeline_cogvideox import get_resize_crop_region_for_grid
from diffusers.training_utils import (
cast_training_params,
clear_objs_and_retain_memory,
free_memory,
)
from diffusers.utils import check_min_version, convert_unet_state_dict_to_peft, export_to_video, is_wandb_available
from diffusers.utils.hub_utils import load_or_create_model_card, populate_model_card
@ -726,7 +726,7 @@ def log_validation(
}
)
clear_objs_and_retain_memory([pipe])
free_memory()
return videos