tori29umai0123 commited on
Commit
eb2c83f
·
1 Parent(s): 28c52cb

Align preset display names

Browse files
Files changed (2) hide show
  1. config.ini +13 -2
  2. src/qwen_image_edit_lite/webui.py +5 -4
config.ini CHANGED
@@ -21,6 +21,7 @@ flow_shift = 3.0
21
 
22
  [preset.default]
23
  japanese_preset = デフォルト
 
24
  image_inputs = 1
25
  image1_label = image1
26
  size_mode = image1
@@ -31,6 +32,7 @@ lora1_scale = 1.0
31
 
32
  [preset.CharacterFourView]
33
  japanese_preset = キャラクター四面図
 
34
  image_inputs = 1
35
  image1_label = image1
36
  size_mode = custom
@@ -44,17 +46,19 @@ lora1_path = "https://huggingface.co/tori29umai/QwenImageEdit2511_LoRA/resolve/m
44
  lora1_scale = 1.0
45
 
46
  [preset.MaskPaint]
47
- japanese_preset = プライバシー保護
 
48
  image_inputs = 1
49
  image1_label = image1
50
  size_mode = image1
51
  custom_ratio = 1:1
52
  prompt = "Sharply restore the blurred areas without preserving the blur. Do not simply smooth or soften the blurred regions; reconstruct the missing edges, textures, details, contrast, and structure based on the surrounding unblurred areas. The repaired areas should match the surrounding image in focus, resolution, sharpness, lighting direction, shadows, colors, and perspective. Edit only the blurred areas and leave all unblurred parts completely unchanged. Ensure there are no visible editing artifacts, smearing, softness, blur, or low-resolution patches remaining."
53
- lora1_path = "https://huggingface.co/tori29umai/QwenImageEdit2511_LoRA/resolve/main/Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16_dim1.safetensors"
54
  lora1_scale = 1.0
55
 
56
  [preset.TextObjectRemover]
57
  japanese_preset = オブジェクト除去(テキスト指定)
 
58
  image_inputs = 1
59
  image1_label = image1
60
  size_mode = image1
@@ -67,6 +71,7 @@ lora2_scale = 1.0
67
 
68
  [preset.Collage]
69
  japanese_preset = コラージュ
 
70
  image_inputs = 1
71
  image1_label = image1
72
  size_mode = image1
@@ -80,6 +85,7 @@ lora2_scale = 1.0
80
 
81
  [preset.Rakugaki]
82
  japanese_preset = 落書き化
 
83
  image_inputs = 1
84
  image1_label = image1
85
  size_mode = image1
@@ -92,6 +98,7 @@ lora2_scale = 1.0
92
 
93
  [preset.TextErase]
94
  japanese_preset = テキスト削除
 
95
  image_inputs = 1
96
  image1_label = image1
97
  size_mode = image1
@@ -104,6 +111,7 @@ lora2_scale = 1.0
104
 
105
  [preset.3Dstyle]
106
  japanese_preset = 3Dスタイル変換
 
107
  image_inputs = 1
108
  image1_label = image1
109
  size_mode = image1
@@ -116,6 +124,7 @@ lora2_scale = 1.0
116
 
117
  [preset.CameraRotation]
118
  japanese_preset = カメラ回転
 
119
  image_inputs = 1
120
  image1_label = image1
121
  size_mode = image1
@@ -128,6 +137,7 @@ lora2_scale = 1.0
128
 
129
  [preset.3Dpose2Character]
130
  japanese_preset = 3Dポーズ→キャラクター
 
131
  image_inputs = 2
132
  image1_label = Character
133
  image2_label = 3Dpose
@@ -141,6 +151,7 @@ lora2_scale = 1.0
141
 
142
  [preset.3Dpose2Character_faceless]
143
  japanese_preset = 3Dポーズ→キャラクター(顔なし)
 
144
  image_inputs = 2
145
  image1_label = Character
146
  image2_label = 3Dpose
 
21
 
22
  [preset.default]
23
  japanese_preset = デフォルト
24
+ english_preset = Default
25
  image_inputs = 1
26
  image1_label = image1
27
  size_mode = image1
 
32
 
33
  [preset.CharacterFourView]
34
  japanese_preset = キャラクター四面図
35
+ english_preset = Character Four View
36
  image_inputs = 1
37
  image1_label = image1
38
  size_mode = custom
 
46
  lora1_scale = 1.0
47
 
48
  [preset.MaskPaint]
49
+ japanese_preset = プライバシー保護(マスク)
50
+ english_preset = Privacy Protection (Mask)
51
  image_inputs = 1
52
  image1_label = image1
53
  size_mode = image1
54
  custom_ratio = 1:1
55
  prompt = "Sharply restore the blurred areas without preserving the blur. Do not simply smooth or soften the blurred regions; reconstruct the missing edges, textures, details, contrast, and structure based on the surrounding unblurred areas. The repaired areas should match the surrounding image in focus, resolution, sharpness, lighting direction, shadows, colors, and perspective. Edit only the blurred areas and leave all unblurred parts completely unchanged. Ensure there are no visible editing artifacts, smearing, softness, blur, or low-resolution patches remaining."
56
+ lora1_path = "Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16_dim1.safetensors"
57
  lora1_scale = 1.0
58
 
59
  [preset.TextObjectRemover]
60
  japanese_preset = オブジェクト除去(テキスト指定)
61
+ english_preset = Object Removal by Text
62
  image_inputs = 1
63
  image1_label = image1
64
  size_mode = image1
 
71
 
72
  [preset.Collage]
73
  japanese_preset = コラージュ
74
+ english_preset = Collage
75
  image_inputs = 1
76
  image1_label = image1
77
  size_mode = image1
 
85
 
86
  [preset.Rakugaki]
87
  japanese_preset = 落書き化
88
+ english_preset = Doodle Style
89
  image_inputs = 1
90
  image1_label = image1
91
  size_mode = image1
 
98
 
99
  [preset.TextErase]
100
  japanese_preset = テキスト削除
101
+ english_preset = Text Removal
102
  image_inputs = 1
103
  image1_label = image1
104
  size_mode = image1
 
111
 
112
  [preset.3Dstyle]
113
  japanese_preset = 3Dスタイル変換
114
+ english_preset = 3D Style Conversion
115
  image_inputs = 1
116
  image1_label = image1
117
  size_mode = image1
 
124
 
125
  [preset.CameraRotation]
126
  japanese_preset = カメラ回転
127
+ english_preset = Camera Rotation
128
  image_inputs = 1
129
  image1_label = image1
130
  size_mode = image1
 
137
 
138
  [preset.3Dpose2Character]
139
  japanese_preset = 3Dポーズ→キャラクター
140
+ english_preset = 3D Pose to Character
141
  image_inputs = 2
142
  image1_label = Character
143
  image2_label = 3Dpose
 
151
 
152
  [preset.3Dpose2Character_faceless]
153
  japanese_preset = 3Dポーズ→キャラクター(顔なし)
154
+ english_preset = 3D Pose to Character (Faceless)
155
  image_inputs = 2
156
  image1_label = Character
157
  image2_label = 3Dpose
src/qwen_image_edit_lite/webui.py CHANGED
@@ -991,9 +991,10 @@ def normalize_preset_loras_for_ui(config, loras: list[tuple[str, float]]) -> lis
991
  return normalized
992
 
993
 
994
- def build_preset_choices(language: str, preset_labels: list[tuple[str, str]]) -> list[tuple[str, str]]:
995
  return [(t(language, "preset_current"), "__current__")] + [
996
- (japanese_label if language == "ja" else key, key) for key, japanese_label in preset_labels
 
997
  ]
998
 
999
 
@@ -1008,7 +1009,7 @@ def build_image_labels(language: str, preset_image_inputs: int, preset_image_lab
1008
  return labels
1009
 
1010
 
1011
- def apply_language(language: str, preset_labels: list[tuple[str, str]]):
1012
  updates: list[gr.Update] = [
1013
  gr.update(value=t(language, "title")),
1014
  gr.update(label=t(language, "language")),
@@ -1750,7 +1751,7 @@ def create_app(config_path: str) -> gr.Blocks:
1750
  preload_vl_model_assets(config)
1751
  lora_choices, _unused = make_lora_choices(config_path)
1752
  preset_labels = [
1753
- (name, str(preset.get("japanese_preset") or name))
1754
  for name, preset in config.presets.items()
1755
  ]
1756
  initial_preset_key = "default"
 
991
  return normalized
992
 
993
 
994
+ def build_preset_choices(language: str, preset_labels: list[tuple[str, str, str]]) -> list[tuple[str, str]]:
995
  return [(t(language, "preset_current"), "__current__")] + [
996
+ (japanese_label if language == "ja" else english_label, key)
997
+ for key, japanese_label, english_label in preset_labels
998
  ]
999
 
1000
 
 
1009
  return labels
1010
 
1011
 
1012
+ def apply_language(language: str, preset_labels: list[tuple[str, str, str]]):
1013
  updates: list[gr.Update] = [
1014
  gr.update(value=t(language, "title")),
1015
  gr.update(label=t(language, "language")),
 
1751
  preload_vl_model_assets(config)
1752
  lora_choices, _unused = make_lora_choices(config_path)
1753
  preset_labels = [
1754
+ (name, str(preset.get("japanese_preset") or name), str(preset.get("english_preset") or name))
1755
  for name, preset in config.presets.items()
1756
  ]
1757
  initial_preset_key = "default"