MCPcopy Create free account
hub / github.com/cpystan/SD-VLM / setup

Method setup

predict.py:79–85  ·  view source on GitHub ↗

Load the model into memory to make running multiple predictions efficient

(self)

Source from the content-addressed store, hash-verified

77
78class Predictor(BasePredictor):
79 def setup(self) -> None:
80 """Load the model into memory to make running multiple predictions efficient"""
81 for weight in weights:
82 download_weights(weight["src"], weight["dest"], weight["files"])
83 disable_torch_init()
84
85 self.tokenizer, self.model, self.image_processor, self.context_len = load_pretrained_model("liuhaotian/llava-v1.5-13b", model_name="llava-v1.5-13b", model_base=None, load_8bit=False, load_4bit=False)
86
87 def predict(
88 self,

Callers

nothing calls this directly

Calls 3

disable_torch_initFunction · 0.90
load_pretrained_modelFunction · 0.90
download_weightsFunction · 0.85

Tested by

no test coverage detected