Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,6 @@ SAFETY_CHECKER = False
|
|
| 12 |
|
| 13 |
loaded_acc = None
|
| 14 |
device = "cuda"
|
| 15 |
-
#device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 16 |
|
| 17 |
ACC_lora={
|
| 18 |
"TDD":"sdxl_tdd_wo_adv_lora.safetensors",
|
|
@@ -79,7 +78,7 @@ if SAFETY_CHECKER:
|
|
| 79 |
return images, has_nsfw_concepts
|
| 80 |
|
| 81 |
|
| 82 |
-
@spaces.GPU(enable_queue=True)
|
| 83 |
def generate_image(
|
| 84 |
prompt,
|
| 85 |
negative_prompt,
|
|
@@ -192,7 +191,7 @@ Target-Driven Distillation (TDD) is a state-of-the-art consistency distillation
|
|
| 192 |
|
| 193 |
with gr.Column(scale=1):
|
| 194 |
with gr.Group():
|
| 195 |
-
img = gr.Image(label="TDD Image", value="
|
| 196 |
submit_sdxl = gr.Button("Run on SDXL")
|
| 197 |
gr.Examples(
|
| 198 |
examples=[
|
|
|
|
| 12 |
|
| 13 |
loaded_acc = None
|
| 14 |
device = "cuda"
|
|
|
|
| 15 |
|
| 16 |
ACC_lora={
|
| 17 |
"TDD":"sdxl_tdd_wo_adv_lora.safetensors",
|
|
|
|
| 78 |
return images, has_nsfw_concepts
|
| 79 |
|
| 80 |
|
| 81 |
+
@spaces.GPU(enable_queue=True, duration=3)
|
| 82 |
def generate_image(
|
| 83 |
prompt,
|
| 84 |
negative_prompt,
|
|
|
|
| 191 |
|
| 192 |
with gr.Column(scale=1):
|
| 193 |
with gr.Group():
|
| 194 |
+
img = gr.Image(label="TDD Image", value="cat.png")
|
| 195 |
submit_sdxl = gr.Button("Run on SDXL")
|
| 196 |
gr.Examples(
|
| 197 |
examples=[
|