fix deprecation of clear_objs_and_retain_memory

This commit is contained in:
LittleNyima 2024-09-30 20:45:53 +08:00
parent 7130d2274b
commit a59ed84b52
No known key found for this signature in database
GPG Key ID: 87E0B0CE8AF393AB

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