tori29umai commited on
Commit
72dca33
1 Parent(s): 0c23f7f
Files changed (2) hide show
  1. app.py +4 -4
  2. 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("prompt解析")
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.ANTIALIAS)
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