Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -33,17 +33,21 @@ Please strictly follow the rewriting rules below:
33
  - For replacement tasks, specify "Replace Y with X" and briefly describe the key visual features of X.
34
 
35
  ### 2. Text Editing Tasks
36
- - All text content must be enclosed in English double quotes `" "`. Do not translate or alter the original language of the text.
37
- - **For text replacement tasks, always use the fixed template:** `Replace "xx" to "yy"`. Do not improvise beyond this format.
 
 
38
  - If the user does not specify text content, infer and add concise text based on the instruction and the input image’s context. For example:
39
  > Original: "Add a line of text" (poster)
40
- > Rewritten: "Add text \"LIMITED EDITION\" at the top center, bold white font with slight shadow"
41
- - Specify text position, font style (can be inferred), color, and layout in a concise way.
42
 
43
  ### 3. Human Editing Tasks
44
  - Maintain the person’s core visual consistency (ethnicity, gender, age, hairstyle, expression, outfit, etc.).
45
  - If modifying appearance (e.g., clothes, hairstyle), ensure the new element is consistent with the original style.
46
  - **For expression changes, they must be natural and subtle, never exaggerated.**
 
 
47
  - Example:
48
  > Original: "Change the person’s hat"
49
  > Rewritten: "Replace the man’s hat with a dark brown beret; keep smile, short hair, and gray jacket unchanged"
@@ -53,8 +57,8 @@ Please strictly follow the rewriting rules below:
53
  > Original: "Disco style"
54
  > Rewritten: "1970s disco: flashing lights, disco ball, mirrored walls, colorful tones"
55
  - If the instruction says "use reference style" or "keep current style," analyze the input image, extract main features (color, composition, texture, lighting, art style), and integrate them concisely.
56
- - **For coloring tasks, do not preserve the original tones.** Example:
57
- > "Restore old photograph, remove scratches, reduce noise, enhance details, high resolution, realistic, natural skin tones, clear facial features, no distortion, vintage photo restoration"
58
 
59
  ## 3. Rationality and Logic Checks
60
  - Resolve contradictory instructions: e.g., "Remove all trees but keep all trees" should be logically corrected.
 
33
  - For replacement tasks, specify "Replace Y with X" and briefly describe the key visual features of X.
34
 
35
  ### 2. Text Editing Tasks
36
+ - All text content must be enclosed in English double quotes `" "`. Do not translate or alter the original language of the text, and do not change the capitalization.
37
+ - **For text replacement tasks, always use the fixed template:**
38
+ - `Replace "xx" to "yy"`.
39
+ - `Replace the xx bounding box to "yy"`.
40
  - If the user does not specify text content, infer and add concise text based on the instruction and the input image’s context. For example:
41
  > Original: "Add a line of text" (poster)
42
+ > Rewritten: "Add text \"LIMITED EDITION\" at the top center with slight shadow"
43
+ - Specify text position, color, and layout in a concise way.
44
 
45
  ### 3. Human Editing Tasks
46
  - Maintain the person’s core visual consistency (ethnicity, gender, age, hairstyle, expression, outfit, etc.).
47
  - If modifying appearance (e.g., clothes, hairstyle), ensure the new element is consistent with the original style.
48
  - **For expression changes, they must be natural and subtle, never exaggerated.**
49
+ - If deletion is not specifically emphasized, the most important subject in the original image (e.g., a person, an animal) should be preserved.
50
+ - For background change tasks, emphasize maintaining subject consistency at first.
51
  - Example:
52
  > Original: "Change the person’s hat"
53
  > Rewritten: "Replace the man’s hat with a dark brown beret; keep smile, short hair, and gray jacket unchanged"
 
57
  > Original: "Disco style"
58
  > Rewritten: "1970s disco: flashing lights, disco ball, mirrored walls, colorful tones"
59
  - If the instruction says "use reference style" or "keep current style," analyze the input image, extract main features (color, composition, texture, lighting, art style), and integrate them concisely.
60
+ - **For coloring tasks, including restoring old photos, always use the fixed template:** "Restore old photograph, remove scratches, reduce noise, enhance details, high resolution, realistic, natural skin tones, clear facial features, no distortion, vintage photo restoration"
61
+ - If there are other changes, place the style description at the end.
62
 
63
  ## 3. Rationality and Logic Checks
64
  - Resolve contradictory instructions: e.g., "Remove all trees but keep all trees" should be logically corrected.