Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -71,7 +71,7 @@ def segment_hair(image):
|
|
71 |
|
72 |
return output_image # Return the RGBA mask
|
73 |
|
74 |
-
@spaces.GPU(duration=
|
75 |
# Function to inpaint the hair area using ControlNet
|
76 |
def inpaint_hair(image, prompt):
|
77 |
# Segment hair to get the mask
|
@@ -95,7 +95,7 @@ def inpaint_hair(image, prompt):
|
|
95 |
image=image_pil,
|
96 |
mask_image=mask_pil,
|
97 |
control_image=inpaint_condition,
|
98 |
-
num_inference_steps=
|
99 |
guidance_scale=7.5,
|
100 |
generator=generator
|
101 |
).images[0]
|
|
|
71 |
|
72 |
return output_image # Return the RGBA mask
|
73 |
|
74 |
+
@spaces.GPU(duration=75)
|
75 |
# Function to inpaint the hair area using ControlNet
|
76 |
def inpaint_hair(image, prompt):
|
77 |
# Segment hair to get the mask
|
|
|
95 |
image=image_pil,
|
96 |
mask_image=mask_pil,
|
97 |
control_image=inpaint_condition,
|
98 |
+
num_inference_steps=20,
|
99 |
guidance_scale=7.5,
|
100 |
generator=generator
|
101 |
).images[0]
|