Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -67,9 +67,9 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
67 |
return image, seed
|
68 |
|
69 |
examples = [
|
70 |
-
"
|
71 |
-
"
|
72 |
-
"
|
73 |
]
|
74 |
|
75 |
css="""
|
@@ -83,45 +83,45 @@ with gr.Blocks(css=css) as demo:
|
|
83 |
|
84 |
with gr.Column(elem_id="col-container"):
|
85 |
gr.Markdown(f"""
|
86 |
-
# 日本語が入力できる
|
87 |
""")
|
88 |
|
89 |
with gr.Row():
|
90 |
|
91 |
prompt = gr.Text(
|
92 |
-
label="
|
93 |
show_label=False,
|
94 |
max_lines=1,
|
95 |
-
placeholder="
|
96 |
container=False,
|
97 |
)
|
98 |
|
99 |
-
run_button = gr.Button("
|
100 |
|
101 |
-
result = gr.Image(label="
|
102 |
|
103 |
-
with gr.Accordion("
|
104 |
|
105 |
negative_prompt = gr.Text(
|
106 |
-
label="
|
107 |
max_lines=1,
|
108 |
-
placeholder="
|
109 |
)
|
110 |
|
111 |
seed = gr.Slider(
|
112 |
-
label="
|
113 |
minimum=0,
|
114 |
maximum=MAX_SEED,
|
115 |
step=1,
|
116 |
value=0,
|
117 |
)
|
118 |
|
119 |
-
randomize_seed = gr.Checkbox(label="
|
120 |
|
121 |
with gr.Row():
|
122 |
|
123 |
width = gr.Slider(
|
124 |
-
label="
|
125 |
minimum=256,
|
126 |
maximum=MAX_IMAGE_SIZE,
|
127 |
step=64,
|
@@ -129,7 +129,7 @@ with gr.Blocks(css=css) as demo:
|
|
129 |
)
|
130 |
|
131 |
height = gr.Slider(
|
132 |
-
label="
|
133 |
minimum=256,
|
134 |
maximum=MAX_IMAGE_SIZE,
|
135 |
step=64,
|
@@ -139,7 +139,7 @@ with gr.Blocks(css=css) as demo:
|
|
139 |
with gr.Row():
|
140 |
|
141 |
guidance_scale = gr.Slider(
|
142 |
-
label="
|
143 |
minimum=0.0,
|
144 |
maximum=10.0,
|
145 |
step=0.1,
|
@@ -147,7 +147,7 @@ with gr.Blocks(css=css) as demo:
|
|
147 |
)
|
148 |
|
149 |
num_inference_steps = gr.Slider(
|
150 |
-
label="
|
151 |
minimum=1,
|
152 |
maximum=50,
|
153 |
step=1,
|
|
|
67 |
return image, seed
|
68 |
|
69 |
examples = [
|
70 |
+
"美味しい肉",
|
71 |
+
"馬に乗った宇宙飛行士",
|
72 |
+
"アニメ風の美少女",
|
73 |
]
|
74 |
|
75 |
css="""
|
|
|
83 |
|
84 |
with gr.Column(elem_id="col-container"):
|
85 |
gr.Markdown(f"""
|
86 |
+
# 日本語が入力できる SD3 Medium
|
87 |
""")
|
88 |
|
89 |
with gr.Row():
|
90 |
|
91 |
prompt = gr.Text(
|
92 |
+
label="プロンプト",
|
93 |
show_label=False,
|
94 |
max_lines=1,
|
95 |
+
placeholder="作りたい画像の特徴を入力してください",
|
96 |
container=False,
|
97 |
)
|
98 |
|
99 |
+
run_button = gr.Button("実行", scale=0)
|
100 |
|
101 |
+
result = gr.Image(label="結果", show_label=False)
|
102 |
|
103 |
+
with gr.Accordion("詳細設定", open=False):
|
104 |
|
105 |
negative_prompt = gr.Text(
|
106 |
+
label="ネガティブプロンプト",
|
107 |
max_lines=1,
|
108 |
+
placeholder="画像から排除したい要素を入力してください",
|
109 |
)
|
110 |
|
111 |
seed = gr.Slider(
|
112 |
+
label="乱数のシード",
|
113 |
minimum=0,
|
114 |
maximum=MAX_SEED,
|
115 |
step=1,
|
116 |
value=0,
|
117 |
)
|
118 |
|
119 |
+
randomize_seed = gr.Checkbox(label="ランダム生成", value=True)
|
120 |
|
121 |
with gr.Row():
|
122 |
|
123 |
width = gr.Slider(
|
124 |
+
label="横",
|
125 |
minimum=256,
|
126 |
maximum=MAX_IMAGE_SIZE,
|
127 |
step=64,
|
|
|
129 |
)
|
130 |
|
131 |
height = gr.Slider(
|
132 |
+
label="縦",
|
133 |
minimum=256,
|
134 |
maximum=MAX_IMAGE_SIZE,
|
135 |
step=64,
|
|
|
139 |
with gr.Row():
|
140 |
|
141 |
guidance_scale = gr.Slider(
|
142 |
+
label="プロンプトの忠実さ",
|
143 |
minimum=0.0,
|
144 |
maximum=10.0,
|
145 |
step=0.1,
|
|
|
147 |
)
|
148 |
|
149 |
num_inference_steps = gr.Slider(
|
150 |
+
label="推論回数",
|
151 |
minimum=1,
|
152 |
maximum=50,
|
153 |
step=1,
|