Spaces:
Sleeping
Sleeping
Commit
·
090982e
1
Parent(s):
74b41d6
Update app.py
Browse files
app.py
CHANGED
@@ -35,6 +35,10 @@ if mps_available:
|
|
35 |
torch_device = "cpu"
|
36 |
torch_dtype = torch.float32
|
37 |
|
|
|
|
|
|
|
|
|
38 |
if SAFETY_CHECKER == "True":
|
39 |
i2i_pipe = AutoPipelineForImage2Image.from_pretrained(
|
40 |
"stabilityai/sdxl-turbo",
|
@@ -43,7 +47,7 @@ if SAFETY_CHECKER == "True":
|
|
43 |
)
|
44 |
t2i_pipe = AutoPipelineForText2Image.from_pretrained(
|
45 |
#"stabilityai/sdxl-turbo",
|
46 |
-
"wanghuging/
|
47 |
torch_dtype=torch_dtype,
|
48 |
variant="fp16" #if torch_dtype == torch.float16 else "fp32",
|
49 |
)
|
@@ -56,7 +60,7 @@ else:
|
|
56 |
)
|
57 |
t2i_pipe = AutoPipelineForText2Image.from_pretrained(
|
58 |
#"stabilityai/sdxl-turbo",
|
59 |
-
"wanghuging/
|
60 |
safety_checker=None,
|
61 |
torch_dtype=torch_dtype,
|
62 |
variant="fp16" #if torch_dtype == torch.float16 else "fp32",
|
@@ -136,7 +140,8 @@ with gr.Blocks(css=css) as demo:
|
|
136 |
with gr.Column(elem_id="container"):
|
137 |
gr.Markdown(
|
138 |
"""# Derm-T2IM Text to Image Skin Cancer
|
139 |
-
##
|
|
|
140 |
""",
|
141 |
elem_id="intro",
|
142 |
)
|
|
|
35 |
torch_device = "cpu"
|
36 |
torch_dtype = torch.float32
|
37 |
|
38 |
+
# pipe = StableDiffusionPipeline.from_single_file(
|
39 |
+
# "https://huggingface.co/wanghuging/skin_demo/blob/main/skin_demo.safetensors"
|
40 |
+
# )
|
41 |
+
|
42 |
if SAFETY_CHECKER == "True":
|
43 |
i2i_pipe = AutoPipelineForImage2Image.from_pretrained(
|
44 |
"stabilityai/sdxl-turbo",
|
|
|
47 |
)
|
48 |
t2i_pipe = AutoPipelineForText2Image.from_pretrained(
|
49 |
#"stabilityai/sdxl-turbo",
|
50 |
+
"wanghuging/demo_model",
|
51 |
torch_dtype=torch_dtype,
|
52 |
variant="fp16" #if torch_dtype == torch.float16 else "fp32",
|
53 |
)
|
|
|
60 |
)
|
61 |
t2i_pipe = AutoPipelineForText2Image.from_pretrained(
|
62 |
#"stabilityai/sdxl-turbo",
|
63 |
+
"wanghuging/demo_model",
|
64 |
safety_checker=None,
|
65 |
torch_dtype=torch_dtype,
|
66 |
variant="fp16" #if torch_dtype == torch.float16 else "fp32",
|
|
|
140 |
with gr.Column(elem_id="container"):
|
141 |
gr.Markdown(
|
142 |
"""# Derm-T2IM Text to Image Skin Cancer
|
143 |
+
## Demo
|
144 |
+
**Model**: https://huggingface.co/stabilityai/sdxl-turbo
|
145 |
""",
|
146 |
elem_id="intro",
|
147 |
)
|