MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / unload_sd_model

Function unload_sd_model

src/backbone.py:61–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59
60
61 def unload_sd_model():
62 from modules import shared, devices
63 if shared.sd_model is not None:
64 if shared.sd_model.cond_stage_model is not None:
65 shared.sd_model.cond_stage_model.to(devices.cpu)
66 if shared.sd_model.first_stage_model is not None:
67 shared.sd_model.first_stage_model.to(devices.cpu)
68 # Maybe something else???
69
70
71 def reload_sd_model():

Callers

nothing calls this directly

Calls 1

toMethod · 0.80

Tested by

no test coverage detected