(self, ImageCaptioning, Inpainting, VisualQuestionAnswering)
| 1184 | class 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, |
nothing calls this directly
no outgoing calls
no test coverage detected