MCPcopy
hub / github.com/lllyasviel/Fooocus / fooocus_fill

Function fooocus_fill

modules/inpaint_worker.py:136–147  ·  view source on GitHub ↗
(image, mask)

Source from the content-addressed store, hash-verified

134
135
136def fooocus_fill(image, mask):
137 current_image = image.copy()
138 raw_image = image.copy()
139 area = np.where(mask < 127)
140 store = raw_image[area]
141
142 for k, repeats in [(512, 2), (256, 2), (128, 4), (64, 4), (33, 8), (15, 8), (5, 16), (3, 16)]:
143 for _ in range(repeats):
144 current_image = box_blur(current_image, k)
145 current_image[area] = store
146
147 return current_image
148
149
150class InpaintWorker:

Callers 1

__init__Method · 0.85

Calls 2

box_blurFunction · 0.85
copyMethod · 0.45

Tested by

no test coverage detected