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

Method __call__

visual_chatgpt.py:1179–1182  ·  view source on GitHub ↗
(self, prompt, image, mask_image, height=512, width=512, num_inference_steps=50)

Source from the content-addressed store, hash-verified

1177 self.inpaint = StableDiffusionInpaintPipeline.from_pretrained(
1178 "runwayml/stable-diffusion-inpainting", revision=self.revision, torch_dtype=self.torch_dtype,safety_checker=StableDiffusionSafetyChecker.from_pretrained('CompVis/stable-diffusion-safety-checker')).to(device)
1179 def __call__(self, prompt, image, mask_image, height=512, width=512, num_inference_steps=50):
1180 update_image = self.inpaint(prompt=prompt, image=image.resize((width, height)),
1181 mask_image=mask_image.resize((width, height)), height=height, width=width, num_inference_steps=num_inference_steps).images[0]
1182 return update_image
1183
1184class InfinityOutPainting:
1185 template_model = True # Add this line to show this is a template model.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected