Skip to content

Commit

Permalink
fix(api): unload UNet before CNet conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 24, 2023
1 parent 054e5c4 commit 9ffe266
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/onnx_web/convert/diffusion/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,9 @@ def convert_diffusion_diffusers_optimum(
location=ONNX_WEIGHTS,
)

del unet
run_gc()

if conversion.control:
logger.debug("converting CNet from pretrained UNet")
cnet_path = convert_diffusion_diffusers_cnet(
Expand Down

0 comments on commit 9ffe266

Please sign in to comment.