Spaces:
Runtime error
Runtime error
Commit
·
01325d0
1
Parent(s):
df25cfa
update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ warnings.filterwarnings('ignore')
|
|
| 4 |
|
| 5 |
import subprocess, io, os, sys, time
|
| 6 |
|
| 7 |
-
os.system("pip install gradio==
|
| 8 |
|
| 9 |
import gradio as gr
|
| 10 |
from loguru import logger
|
|
@@ -647,7 +647,8 @@ def processs_inpainting(inpaint_prompt, input_image, mask_image, image_input_com
|
|
| 647 |
logger.info(f'processs_inpainting_job_image={job_image}')
|
| 648 |
logger.info(f'processs_inpainting_job_mask_image={job_mask_image}')
|
| 649 |
|
| 650 |
-
if 0==
|
|
|
|
| 651 |
client = Client("Kwai-Kolors/Kolors-Inpainting", hf_token=huggingface_token, verbose=True)
|
| 652 |
job = client.submit(
|
| 653 |
prompt=inpaint_prompt,
|
|
@@ -661,6 +662,7 @@ def processs_inpainting(inpaint_prompt, input_image, mask_image, image_input_com
|
|
| 661 |
api_name="/infer"
|
| 662 |
)
|
| 663 |
elif 0==0:
|
|
|
|
| 664 |
client = Client("ameerazam08/FLUX.1-dev-Inpainting-Model-Beta-GPU")
|
| 665 |
job = client.submit(
|
| 666 |
input_image_editor=job_image,
|
|
@@ -675,7 +677,6 @@ def processs_inpainting(inpaint_prompt, input_image, mask_image, image_input_com
|
|
| 675 |
api_name="/process"
|
| 676 |
)
|
| 677 |
|
| 678 |
-
debug = True
|
| 679 |
if debug:
|
| 680 |
count = 0
|
| 681 |
logger.info(f'{count}___{job.status()}')
|
|
@@ -1123,7 +1124,8 @@ def main_gradio(args):
|
|
| 1123 |
if ram_enable:
|
| 1124 |
DESCRIPTION += f'RAM from [RelateAnything](https://github.com/Luodian/RelateAnything). <br>'
|
| 1125 |
if inpainting_enable:
|
| 1126 |
-
DESCRIPTION += f'Inpainting from [
|
|
|
|
| 1127 |
DESCRIPTION += f'Thanks for their excellent work.'
|
| 1128 |
DESCRIPTION += f'<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. \
|
| 1129 |
<a href="https://huggingface.co/spaces/yizhangliu/Grounded-Segment-Anything?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|
|
|
|
| 4 |
|
| 5 |
import subprocess, io, os, sys, time
|
| 6 |
|
| 7 |
+
os.system("pip install gradio==5.1.0")
|
| 8 |
|
| 9 |
import gradio as gr
|
| 10 |
from loguru import logger
|
|
|
|
| 647 |
logger.info(f'processs_inpainting_job_image={job_image}')
|
| 648 |
logger.info(f'processs_inpainting_job_mask_image={job_mask_image}')
|
| 649 |
|
| 650 |
+
if 0==1:
|
| 651 |
+
logger.info(f'processs_inpainting_HF = Kwai-Kolors/Kolors-Inpainting')
|
| 652 |
client = Client("Kwai-Kolors/Kolors-Inpainting", hf_token=huggingface_token, verbose=True)
|
| 653 |
job = client.submit(
|
| 654 |
prompt=inpaint_prompt,
|
|
|
|
| 662 |
api_name="/infer"
|
| 663 |
)
|
| 664 |
elif 0==0:
|
| 665 |
+
logger.info(f'processs_inpainting_HF = ameerazam08/FLUX.1-dev-Inpainting-Model-Beta-GPU')
|
| 666 |
client = Client("ameerazam08/FLUX.1-dev-Inpainting-Model-Beta-GPU")
|
| 667 |
job = client.submit(
|
| 668 |
input_image_editor=job_image,
|
|
|
|
| 677 |
api_name="/process"
|
| 678 |
)
|
| 679 |
|
|
|
|
| 680 |
if debug:
|
| 681 |
count = 0
|
| 682 |
logger.info(f'{count}___{job.status()}')
|
|
|
|
| 1124 |
if ram_enable:
|
| 1125 |
DESCRIPTION += f'RAM from [RelateAnything](https://github.com/Luodian/RelateAnything). <br>'
|
| 1126 |
if inpainting_enable:
|
| 1127 |
+
DESCRIPTION += f'Inpainting from [FLUX.1-dev-Inpainting-Model-Beta-GPU](https://huggingface.co/spaces/ameerazam08/FLUX.1-dev-Inpainting-Model-Beta-GPU). <br>'
|
| 1128 |
+
# DESCRIPTION += f'Inpainting from [Kolors-Inpainting](https://huggingface.co/spaces/Kwai-Kolors/Kolors-Inpainting). <br>'
|
| 1129 |
DESCRIPTION += f'Thanks for their excellent work.'
|
| 1130 |
DESCRIPTION += f'<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. \
|
| 1131 |
<a href="https://huggingface.co/spaces/yizhangliu/Grounded-Segment-Anything?duplicate=true"><img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a></p>'
|