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

Function on_image_change

gradio_app.py:181–192  ·  view source on GitHub ↗
(model, image_size, image)

Source from the content-addressed store, hash-verified

179
180
181def on_image_change(model, image_size, image):
182 image = Image.fromarray(image)
183 result = inverse_image(
184 model.g_ema,
185 image,
186 image_size=image_size
187 )
188 result['history'] = []
189 image = to_image(result['sample'])
190 points = {'target': [], 'handle': []}
191 target_point = False
192 return image, image, result, points, target_point
193
194
195def 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