Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,9 +13,9 @@ from gradio_client import Client, handle_file
|
|
| 13 |
|
| 14 |
# Load the model once globally to avoid repeated loading
|
| 15 |
def load_inpainting_model():
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
model_path = "pornmasterAmateur_v6Vae-inpainting.safetensors"
|
| 19 |
device = "cpu" # Explicitly use CPU
|
| 20 |
pipe = StableDiffusionInpaintPipeline.from_single_file(
|
| 21 |
model_path,
|
|
@@ -57,7 +57,7 @@ def inpaint_image(input_image, mask_image):
|
|
| 57 |
prompt = "undress, naked"
|
| 58 |
result = inpaint_pipeline(prompt=prompt, image=input_image, mask_image=mask_image)
|
| 59 |
inpainted_image = result.images[0]
|
| 60 |
-
inpainted_image = resize_to_match(input_image, inpainted_image)
|
| 61 |
return inpainted_image
|
| 62 |
|
| 63 |
# Function to process input image and mask
|
|
|
|
| 13 |
|
| 14 |
# Load the model once globally to avoid repeated loading
|
| 15 |
def load_inpainting_model():
|
| 16 |
+
model_path = "uberRealisticPornMerge_v23Inpainting.safetensors"
|
| 17 |
+
model_path = "pornmasterFantasy_v4-inpainting.safetensors"
|
| 18 |
+
#model_path = "pornmasterAmateur_v6Vae-inpainting.safetensors"
|
| 19 |
device = "cpu" # Explicitly use CPU
|
| 20 |
pipe = StableDiffusionInpaintPipeline.from_single_file(
|
| 21 |
model_path,
|
|
|
|
| 57 |
prompt = "undress, naked"
|
| 58 |
result = inpaint_pipeline(prompt=prompt, image=input_image, mask_image=mask_image)
|
| 59 |
inpainted_image = result.images[0]
|
| 60 |
+
#inpainted_image = resize_to_match(input_image, inpainted_image)
|
| 61 |
return inpainted_image
|
| 62 |
|
| 63 |
# Function to process input image and mask
|