MCPcopy Index your code
hub / github.com/OpenGVLab/DragGAN / on_undo

Function on_undo

draggan/deprecated/web.py:118–128  ·  view source on GitHub ↗
(points, image, state, size)

Source from the content-addressed store, hash-verified

116
117
118def on_undo(points, image, state, size):
119 image = to_image(state['sample'])
120
121 if len(points['target']) < len(points['handle']):
122 points['handle'] = points['handle'][:-1]
123 else:
124 points['handle'] = points['handle'][:-1]
125 points['target'] = points['target'][:-1]
126
127 image = add_points_to_image(image, points, size=SIZE_TO_CLICK_SIZE[size])
128 return points, image, False
129
130
131def on_change_model(selected, model):

Callers

nothing calls this directly

Calls 2

to_imageFunction · 0.70
add_points_to_imageFunction · 0.70

Tested by

no test coverage detected