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

Method add_lora_entry

model_manager.py:138–153  ·  view source on GitHub ↗
(
        self, base_model, lora_name, trt_lora_path, fp32, inpaint, vram, unet_hidden_dim
    )

Source from the content-addressed store, hash-verified

136 self.write_json()
137
138 def add_lora_entry(
139 self, base_model, lora_name, trt_lora_path, fp32, inpaint, vram, unet_hidden_dim
140 ):
141 config = ModelConfig(
142 [[], [], []], False, fp32, inpaint, True, True, vram, unet_hidden_dim
143 )
144
145 self.all_models[self.cc][lora_name] = [
146 {
147 "filepath": trt_lora_path,
148 "base_model": base_model,
149 "config": config,
150 }
151 ]
152
153 self.write_json()
154
155 def write_json(self):
156 with open(self.model_file, "w") as f:

Callers

nothing calls this directly

Calls 2

write_jsonMethod · 0.95
ModelConfigClass · 0.90

Tested by

no test coverage detected