Last active
February 23, 2023 18:04
-
-
Save takuma104/ce954bde6511a1f0b031a87a646b1f7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from diffusers import UNet2DConditionModel | |
mem_bytes = torch.cuda.max_memory_allocated() | |
torch.cuda.reset_peak_memory_stats() | |
controlnet = UNet2DConditionModel.from_pretrained("takuma104/control_sd15_canny", subfolder="controlnet").cuda() | |
mem_bytes = torch.cuda.max_memory_allocated() | |
print(mem_bytes) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment