Spaces:
Runtime error
Runtime error
stay-toxicx
commited on
Commit
•
7880ff5
1
Parent(s):
83f12db
Update app.py
Browse files
app.py
CHANGED
@@ -6,22 +6,8 @@ from diffusers import DiffusionPipeline
|
|
6 |
import torch
|
7 |
|
8 |
from gradio_client import Client
|
9 |
-
a22= input("Enter prompt!!")
|
10 |
|
11 |
-
|
12 |
-
result = client.predict(
|
13 |
-
prompt=a22,
|
14 |
-
negative_prompt="(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation",
|
15 |
-
use_negative_prompt=True,
|
16 |
-
style="3840 x 2160",
|
17 |
-
seed=0,
|
18 |
-
width=1024,
|
19 |
-
height=1024,
|
20 |
-
guidance_scale=6,
|
21 |
-
randomize_seed=True,
|
22 |
-
api_name="/run"
|
23 |
-
)
|
24 |
-
print(result)
|
25 |
|
26 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
27 |
model_repo_id = "stabilityai/sdxl-turbo" #Replace to the model you would like to use
|
@@ -69,6 +55,9 @@ css="""
|
|
69 |
max-width: 640px;
|
70 |
}
|
71 |
"""
|
|
|
|
|
|
|
72 |
|
73 |
with gr.Blocks(css=css) as demo:
|
74 |
|
@@ -89,7 +78,18 @@ with gr.Blocks(css=css) as demo:
|
|
89 |
|
90 |
run_button = gr.Button("Run", scale=0)
|
91 |
|
92 |
-
result =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
with gr.Accordion("Advanced Settings", open=False):
|
95 |
|
|
|
6 |
import torch
|
7 |
|
8 |
from gradio_client import Client
|
|
|
9 |
|
10 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
model_repo_id = "stabilityai/sdxl-turbo" #Replace to the model you would like to use
|
|
|
55 |
max-width: 640px;
|
56 |
}
|
57 |
"""
|
58 |
+
client = Client("mukaist/DALLE-4K")
|
59 |
+
|
60 |
+
print(result)
|
61 |
|
62 |
with gr.Blocks(css=css) as demo:
|
63 |
|
|
|
78 |
|
79 |
run_button = gr.Button("Run", scale=0)
|
80 |
|
81 |
+
result = client.predict(
|
82 |
+
|
83 |
+
negative_prompt="(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation",
|
84 |
+
use_negative_prompt=True,
|
85 |
+
style="3840 x 2160",
|
86 |
+
seed=0,
|
87 |
+
width=1024,
|
88 |
+
height=1024,
|
89 |
+
guidance_scale=6,
|
90 |
+
randomize_seed=True,
|
91 |
+
api_name="/run"
|
92 |
+
)
|
93 |
|
94 |
with gr.Accordion("Advanced Settings", open=False):
|
95 |
|