Skip to content

Instantly share code, notes, and snippets.

View pattontim's full-sized avatar
🎯
Focusing

pattontim

🎯
Focusing
View GitHub Profile
date value
2013-04-28 20
2013-04-29 22
2013-04-30 25
2013-05-01 26
2013-05-02 29
2013-05-03 32
2013-05-04 35
2013-05-05 40
2013-05-06 43
import torch
import os
import gc
# About:
# Tests GPU fast load when initializing LatentDiffusion and using safetensors
# to recreate potential unclean memory state in torch: https://github.com/huggingface/safetensors/issues/115
# Requirements:
# - ldm (grab folder from one of:
# CompVis - https://github.com/CompVis/latent-diffusion/tree/main/ldm (2022-11-30)