MCPcopy Index your code
hub / github.com/NVIDIA/Stable-Diffusion-WebUI-TensorRT / __init__

Method __init__

model_manager.py:34–43  ·  view source on GitHub ↗
(self, model_file=MODEL_FILE)

Source from the content-addressed store, hash-verified

32
33class ModelManager:
34 def __init__(self, model_file=MODEL_FILE) -> None:
35 self.all_models = {}
36 self.model_file = model_file
37 self.cc = "cc{}{}".format(cc_major, cc_minor)
38 if not os.path.exists(model_file):
39 warning("Model file does not exist. Creating new one.")
40 else:
41 self.all_models = self.read_json()
42
43 self.update()
44
45 @staticmethod
46 def get_onnx_path(model_name):

Callers

nothing calls this directly

Calls 2

read_jsonMethod · 0.95
updateMethod · 0.95

Tested by

no test coverage detected