liuyizhang
commited on
Commit
•
e304363
1
Parent(s):
17dd43a
update app.py
Browse files- app.py +8 -8
- requirements.txt +3 -4
app.py
CHANGED
@@ -251,9 +251,9 @@ sd_pipe = None
|
|
251 |
if os.environ.get('IS_MY_DEBUG') is None:
|
252 |
sd_pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
253 |
"runwayml/stable-diffusion-inpainting",
|
254 |
-
# revision="fp16"
|
255 |
# "stabilityai/stable-diffusion-2-inpainting",
|
256 |
-
torch_dtype=torch.float16
|
257 |
)
|
258 |
sd_pipe = sd_pipe.to(device)
|
259 |
|
@@ -714,11 +714,11 @@ if __name__ == "__main__":
|
|
714 |
task_type.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
715 |
mask_source_radio.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
716 |
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
|
724 |
block.launch(server_name='0.0.0.0', debug=args.debug, share=args.share)
|
|
|
251 |
if os.environ.get('IS_MY_DEBUG') is None:
|
252 |
sd_pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
253 |
"runwayml/stable-diffusion-inpainting",
|
254 |
+
# revision="fp16",
|
255 |
# "stabilityai/stable-diffusion-2-inpainting",
|
256 |
+
torch_dtype=torch.float16,
|
257 |
)
|
258 |
sd_pipe = sd_pipe.to(device)
|
259 |
|
|
|
714 |
task_type.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
715 |
mask_source_radio.change(fn=change_radio_display, inputs=[task_type, mask_source_radio], outputs=[text_prompt, inpaint_prompt, mask_source_radio, num_relation])
|
716 |
|
717 |
+
DESCRIPTION = f'### This demo from [Grounded-Segment-Anything](https://github.com/IDEA-Research/Grounded-Segment-Anything). <br>'
|
718 |
+
DESCRIPTION += f'RAM from [RelateAnything](https://github.com/Luodian/RelateAnything). <br>'
|
719 |
+
DESCRIPTION += f'Thanks for their excellent work.'
|
720 |
+
DESCRIPTION += f'<p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings. \
|
721 |
+
<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>'
|
722 |
+
gr.Markdown(DESCRIPTION)
|
723 |
|
724 |
block.launch(server_name='0.0.0.0', debug=args.debug, share=args.share)
|
requirements.txt
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
accelerate
|
2 |
addict
|
3 |
-
diffusers
|
4 |
-
gradio
|
5 |
-
gradio_client
|
6 |
huggingface_hub
|
7 |
matplotlib
|
8 |
numpy
|
@@ -18,7 +17,7 @@ termcolor
|
|
18 |
timm
|
19 |
torch
|
20 |
torchvision
|
21 |
-
transformers
|
22 |
yapf
|
23 |
numba
|
24 |
scipy
|
|
|
1 |
accelerate
|
2 |
addict
|
3 |
+
diffusers
|
4 |
+
gradio==3.27.0
|
|
|
5 |
huggingface_hub
|
6 |
matplotlib
|
7 |
numpy
|
|
|
17 |
timm
|
18 |
torch
|
19 |
torchvision
|
20 |
+
transformers
|
21 |
yapf
|
22 |
numba
|
23 |
scipy
|