Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
72dca33
1
Parent(s):
0c23f7f
app.py
Browse files- app.py +4 -4
- utils/utils.py +1 -1
app.py
CHANGED
@@ -114,13 +114,13 @@ class Img2Img:
|
|
114 |
self.prompt = gr.Textbox(label="prompt", lines=3)
|
115 |
self.negative_prompt = gr.Textbox(label="negative_prompt", lines=3, value="lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
|
116 |
|
117 |
-
prompt_analysis_button = gr.Button("
|
118 |
|
119 |
-
self.controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=1.0, step=0.01, label="
|
120 |
|
121 |
-
generate_button = gr.Button("
|
122 |
with gr.Column():
|
123 |
-
self.output_image = gr.Image(type="pil", label="
|
124 |
|
125 |
|
126 |
prompt_analysis_button.click(
|
|
|
114 |
self.prompt = gr.Textbox(label="prompt", lines=3)
|
115 |
self.negative_prompt = gr.Textbox(label="negative_prompt", lines=3, value="lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
|
116 |
|
117 |
+
prompt_analysis_button = gr.Button("prompt_analysis")
|
118 |
|
119 |
+
self.controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=1.0, step=0.01, label="controlnet_scale")
|
120 |
|
121 |
+
generate_button = gr.Button("generate")
|
122 |
with gr.Column():
|
123 |
+
self.output_image = gr.Image(type="pil", label="output_image")
|
124 |
|
125 |
|
126 |
prompt_analysis_button.click(
|
utils/utils.py
CHANGED
@@ -109,7 +109,7 @@ def resize_image_aspect_ratio(image):
|
|
109 |
target_width, target_height = sizes[closest_aspect_ratio]
|
110 |
|
111 |
# リサイズ処理
|
112 |
-
resized_image = image.resize((target_width, target_height), Image.
|
113 |
|
114 |
return resized_image
|
115 |
|
|
|
109 |
target_width, target_height = sizes[closest_aspect_ratio]
|
110 |
|
111 |
# リサイズ処理
|
112 |
+
resized_image = image.resize((target_width, target_height), Image.LANCZOS)
|
113 |
|
114 |
return resized_image
|
115 |
|