MCPcopy
hub / github.com/Stability-AI/generative-models / unload_model

Function unload_model

scripts/demo/streamlit_helpers.py:114–118  ·  view source on GitHub ↗
(model)

Source from the content-addressed store, hash-verified

112
113
114def unload_model(model):
115 global lowvram_mode
116 if lowvram_mode:
117 model.cpu()
118 torch.cuda.empty_cache()
119
120
121def load_model_from_config(config, ckpt=None, verbose=True):

Callers 2

do_sampleFunction · 0.85
do_img2imgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected