MCPcopy Create free account
hub / github.com/chenfei-wu/TaskMatrix / __init__

Method __init__

visual_chatgpt.py:1186–1193  ·  view source on GitHub ↗
(self, ImageCaptioning, Inpainting, VisualQuestionAnswering)

Source from the content-addressed store, hash-verified

1184class InfinityOutPainting:
1185 template_model = True # Add this line to show this is a template model.
1186 def __init__(self, ImageCaptioning, Inpainting, VisualQuestionAnswering):
1187 self.llm = OpenAI(temperature=0)
1188 self.ImageCaption = ImageCaptioning
1189 self.inpaint = Inpainting
1190 self.ImageVQA = VisualQuestionAnswering
1191 self.a_prompt = 'best quality, extremely detailed'
1192 self.n_prompt = 'longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, ' \
1193 'fewer digits, cropped, worst quality, low quality'
1194
1195 def get_BLIP_vqa(self, image, question):
1196 inputs = self.ImageVQA.processor(image, question, return_tensors="pt").to(self.ImageVQA.device,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected