Skip to content

Commit 04f64ab

Browse files
authored
feat: add translation for image size describe (#2992)
1 parent 7b70d27 commit 04f64ab

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

language/en.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@
99
"Advanced": "Advanced",
1010
"Upscale or Variation": "Upscale or Variation",
1111
"Image Prompt": "Image Prompt",
12-
"Inpaint or Outpaint (beta)": "Inpaint or Outpaint (beta)",
13-
"Drag above image to here": "Drag above image to here",
12+
"Inpaint or Outpaint": "Inpaint or Outpaint",
13+
"Drag inpaint or outpaint image to here": "Drag inpaint or outpaint image to here",
14+
"Outpaint Direction": "Outpaint Direction",
15+
"Method": "Method",
16+
"Describe": "Describe",
17+
"Drag any image to here": "Drag any image to here",
18+
"Content Type": "Content Type",
19+
"Photograph": "Photograph",
20+
"Art/Anime": "Art/Anime",
21+
"Describe this Image into Prompt": "Describe this Image into Prompt",
22+
"Image Size and Recommended Size": "Image Size and Recommended Size",
1423
"Upscale or Variation:": "Upscale or Variation:",
24+
"Drag above image to here": "Drag above image to here",
1525
"Disabled": "Disabled",
1626
"Vary (Subtle)": "Vary (Subtle)",
1727
"Vary (Strong)": "Vary (Strong)",

modules/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ def get_image_size_info(image: np.ndarray, aspect_ratios: list) -> str:
494494
recommended_gcd = math.gcd(recommended_width, recommended_height)
495495
recommended_lcm_ratio = f'{recommended_width // recommended_gcd}:{recommended_height // recommended_gcd}'
496496

497-
size_info += f'\nRecommended Size: {recommended_width} x {recommended_height}, Ratio: {recommended_ratio}, {recommended_lcm_ratio}'
497+
size_info = f'{width} x {height}, {ratio}, {lcm_ratio}'
498+
size_info += f'\n{recommended_width} x {recommended_height}, {recommended_ratio}, {recommended_lcm_ratio}'
498499

499500
return size_info
500501
except Exception as e:

webui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def ip_advance_checked(x):
221221
choices=[flags.desc_type_photo, flags.desc_type_anime],
222222
value=flags.desc_type_photo)
223223
desc_btn = gr.Button(value='Describe this Image into Prompt')
224-
desc_image_size = gr.Markdown(label='Image Size', elem_id='desc_image_size', visible=False)
224+
desc_image_size = gr.Textbox(label='Image Size and Recommended Size', elem_id='desc_image_size', visible=False)
225225
gr.HTML('<a href="https://github.com/lllyasviel/Fooocus/discussions/1363" target="_blank">\U0001F4D4 Document</a>')
226226

227227
def trigger_show_image_properties(image):

0 commit comments

Comments
 (0)