1
0
Fork 0

fix(api): unload UNet before CNet conversion

This commit is contained in:
Sean Sube 2023-12-24 05:32:30 -06:00
parent 054e5c406a
commit 9ffe266384
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 3 additions and 0 deletions

View File

@ -878,6 +878,9 @@ def convert_diffusion_diffusers_optimum(
location=ONNX_WEIGHTS, location=ONNX_WEIGHTS,
) )
del unet
run_gc()
if conversion.control: if conversion.control:
logger.debug("converting CNet from pretrained UNet") logger.debug("converting CNet from pretrained UNet")
cnet_path = convert_diffusion_diffusers_cnet( cnet_path = convert_diffusion_diffusers_cnet(