MCPcopy Create free account
hub / github.com/OpenGVLab/DragGAN / on_image_change

Function on_image_change

draggan/web.py:182–193  ·  view source on GitHub ↗
(model, image_size, image)

Source from the content-addressed store, hash-verified

180
181
182def on_image_change(model, image_size, image):
183 image = Image.fromarray(image)
184 result = inverse_image(
185 model.g_ema,
186 image,
187 image_size=image_size
188 )
189 result['history'] = []
190 image = to_image(result['sample'])
191 points = {'target': [], 'handle': []}
192 target_point = False
193 return image, image, result, points, target_point
194
195
196def on_mask_change(mask):

Callers

nothing calls this directly

Calls 2

inverse_imageFunction · 0.85
to_imageFunction · 0.70

Tested by

no test coverage detected