Skip to content

Commit c78b43c

Browse files
committed
garbage collection
1 parent e2169b0 commit c78b43c

2 files changed

Lines changed: 5 additions & 110 deletions

File tree

tests/flux/test_flux_txt2img_cache_controlnet.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import gc
2+
13
import torch
24
from diffusers import (
35
AutoencoderKL,
@@ -89,6 +91,9 @@
8991
).images[0]
9092
txt2img_res.save("flux.1-dev-txt2img.jpg")
9193

94+
gc.collect()
95+
torch.cuda.empty_cache()
96+
9297
# cache
9398
apply_cache_on_pipe(
9499
pipe_cn,

tests/test_flux_txt2img_cache_controlnet.py

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)