yizhangliu
commited on
Commit
•
904637c
1
Parent(s):
e56f195
update app.ay
Browse files
app.py
CHANGED
@@ -74,7 +74,6 @@ from segment_anything import build_sam, SamPredictor, SamAutomaticMaskGenerator
|
|
74 |
# diffusers
|
75 |
import PIL
|
76 |
import requests
|
77 |
-
import torch
|
78 |
from io import BytesIO
|
79 |
from diffusers import StableDiffusionInpaintPipeline
|
80 |
from huggingface_hub import hf_hub_download
|
@@ -669,7 +668,7 @@ def load_kolors_inpainting(inpaint_prompt, input_image, mask_image):
|
|
669 |
image=job_image,
|
670 |
mask_image=job_mask_image,
|
671 |
negative_prompt="broken fingers, deformed fingers, deformed hands, stumps, blurriness, low quality",
|
672 |
-
seed=
|
673 |
randomize_seed=True,
|
674 |
guidance_scale=6,
|
675 |
num_inference_steps=25,
|
@@ -691,7 +690,7 @@ def load_kolors_inpainting(inpaint_prompt, input_image, mask_image):
|
|
691 |
background.paste(im, mask=im.split()[3])
|
692 |
return im
|
693 |
except Exception as e:
|
694 |
-
logger.info(f'
|
695 |
return None
|
696 |
|
697 |
def run_anything_task(input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold,
|
|
|
74 |
# diffusers
|
75 |
import PIL
|
76 |
import requests
|
|
|
77 |
from io import BytesIO
|
78 |
from diffusers import StableDiffusionInpaintPipeline
|
79 |
from huggingface_hub import hf_hub_download
|
|
|
668 |
image=job_image,
|
669 |
mask_image=job_mask_image,
|
670 |
negative_prompt="broken fingers, deformed fingers, deformed hands, stumps, blurriness, low quality",
|
671 |
+
seed=0,
|
672 |
randomize_seed=True,
|
673 |
guidance_scale=6,
|
674 |
num_inference_steps=25,
|
|
|
690 |
background.paste(im, mask=im.split()[3])
|
691 |
return im
|
692 |
except Exception as e:
|
693 |
+
logger.info(f'load_kolors_inpainting_[Error]:' + str(e))
|
694 |
return None
|
695 |
|
696 |
def run_anything_task(input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold,
|