merge clothing stage and accessories stage of stylist guide

This commit is contained in:
pangkaicheng
2026-01-12 11:52:53 +08:00
parent 4fa815158f
commit 077ceea219
9 changed files with 63 additions and 63 deletions

View File

@@ -102,15 +102,12 @@ class AsyncStylistAgent:
def _load_style_guide(self, stylist_name: str):
"""加载 markdown 风格指南内容。"""
guide_path = os.path.join(settings.STYLIST_GUIDE_DIR, f"{stylist_name}_en.md")
acc_guide_path = os.path.join(settings.STYLIST_GUIDE_DIR, f"{stylist_name}_acc.md")
try:
with open(guide_path, 'r', encoding='utf-8') as file:
stylist_guide = file.read()
with open(acc_guide_path, 'r', encoding='utf-8') as file:
accessories_guide = file.read()
return stylist_guide, accessories_guide
return stylist_guide
except Exception as e:
raise Exception(f"Failed to load style guide from {guide_path}, {acc_guide_path}: {e}")
raise Exception(f"Failed to load style guide from {guide_path}: {e}")
async def _call_gemini(self, user_input: str, user_id: str, file_name: str, output_schema: Dict[str, Any], image_bytes: bytes = None, system_prompt: str = "") -> str:
"""
@@ -519,7 +516,7 @@ class AsyncStylistAgent:
self.outfit_items = []
else:
self.outfit_items = deepcopy(start_outfit)
stylist_guide, accessories_guide = self._load_style_guide(self.stylist_name)
stylist_guide = self._load_style_guide(self.stylist_name)
url = f'{callback_url}/api/style/callback'
if not occasions:
occasions = ["Casual"]
@@ -563,7 +560,7 @@ class AsyncStylistAgent:
general_rule,
request_summary,
occasions[0],
accessories_guide,
stylist_guide,
current_category,
allowed_subcategories,
MAX_LEN_ACC
@@ -606,7 +603,7 @@ class AsyncStylistAgent:
self.outfit_items = []
else:
self.outfit_items = deepcopy(start_outfit)
stylist_guide, accessories_guide = self._load_style_guide(self.stylist_name)
stylist_guide = self._load_style_guide(self.stylist_name)
url = f'{callback_url}/api/style/callback'
MAX_LEN = 9
@@ -622,7 +619,7 @@ class AsyncStylistAgent:
general_rules,
request_summary,
occasions[0],
stylist_guide + accessories_guide,
stylist_guide,
"",
allowed_subcategories,
MAX_LEN

View File

@@ -1,17 +0,0 @@
# Crystal's Accessory Guide: Pure Balance
This guide strictly outlines accessory selection, emphasizing Gold Tones and pure, solid colors to stabilize the outfit's primary focus on bold pattern clashing.
## I. Color, Pattern, and Material Constraints
Color & Tone: All jewelry must be in Gold Tones. Vector-style accessories are prohibited.
Accessory Pattern: Bags and shoes must be Solid Color only. Patterned or printed bags and shoes are strictly prohibited.
## II. Mandatory & Stacking Requirements
The use of accessories is essential to complete the look, focusing on stacking and specific shapes:
Mandatory Jewelry: A Necklace is mandatory (minimum one piece). A Watch must be included as part of the wrist stack.
Earrings: Must be Hoop Earrings.
Stacking: Encourage stacking of Bracelets and Rings alongside the mandatory watch.

View File

@@ -36,4 +36,19 @@ This stylist's style prioritizes visual impact through **clashing prints** rathe
4. **Color Base**: No strict color restrictions on garments, but shoes must be **pure, solid colors**.
5. **Shoe Principle**: Shoes should provide height (low heel, platform, boots).
6. **Overall Balance**: If clothing patterns are complex, shoes must be **simple and pure** to ground the look. Style leans toward **mixed-casual and energetic**, avoiding blandness.
8. **Scene Adaptability**: Add **cargo pants/low heels** for casual settings; **yoga sets** for sportier looks; use **denim** to balance out heavy prints.
8. **Scene Adaptability**: Add **cargo pants/low heels** for casual settings; **yoga sets** for sportier looks; use **denim** to balance out heavy prints.
---
## Accessory Guide: Pure Balance
This section strictly outlines accessory selection, emphasizing Gold Tones and pure, solid colors to stabilize the outfit's primary focus on bold pattern clashing.
### I. Color, Pattern, and Material Constraints
Color & Tone: All jewelry must be in Gold Tones. Vector-style accessories are prohibited.
Accessory Pattern: Bags and shoes must be Solid Color only. Patterned or printed bags and shoes are strictly prohibited.
### II. Mandatory & Stacking Requirements
The use of accessories is essential to complete the look, focusing on stacking and specific shapes:
Mandatory Jewelry: A Necklace is mandatory (minimum one piece). A Watch must be included as part of the wrist stack.
Earrings: Must be Hoop Earrings.
Stacking: Encourage stacking of Bracelets and Rings alongside the mandatory watch.

View File

@@ -1,10 +0,0 @@
# Accessory Style Guide
This guide strictly outlines accessory selection, emphasizing a flexible approach to metal tones and highlighting the aesthetic of long-worn items.
# I. Color and Material Constraints
Metal Tones: Both Gold and Silver metals are preferred and should be mixed and matched together.
Aesthetic Preference: Items that show wear, such as Silver items that have changed color over time, are acceptable as they present a unique personal preference.
# II. Mandatory & Stacking Requirements
Mandatory Items: No specific jewelry piece is listed as mandatory, but the style encourages mixing both gold and silver jewelry.

View File

@@ -17,4 +17,14 @@ Bags: Functional bags that can hold "everything" are preferred over mini bags. A
Color Mixing: All color tones are acceptable for mixing together, including highly varied tones (e.g., rainbow colors), as long as they create a mutual harmony.
## II. Styling Pattern: Functional and Harmonious
This stylist prioritizes practical, comfortable items (functional bag, sneakers) while embracing complex color and print compositions that lean on Black as a foundational element. The style aims for a unique, harmonious look achieved through flexible mixing.
This stylist prioritizes practical, comfortable items (functional bag, sneakers) while embracing complex color and print compositions that lean on Black as a foundational element. The style aims for a unique, harmonious look achieved through flexible mixing.
## Accessory Style Guide
This section strictly outlines accessory selection, emphasizing a flexible approach to metal tones and highlighting the aesthetic of long-worn items.
### I. Color and Material Constraints
Metal Tones: Both Gold and Silver metals are preferred and should be mixed and matched together.
Aesthetic Preference: Items that show wear, such as Silver items that have changed color over time, are acceptable as they present a unique personal preference.
### II. Mandatory & Stacking Requirements
Mandatory Items: No specific jewelry piece is listed as mandatory, but the style encourages mixing both gold and silver jewelry.

View File

@@ -1,12 +0,0 @@
Stylist Accessories Guide
I. Gold Jewelry
Preference: Necklace, Bracelet, and Earrings must all be present and layered.
Prohibition: Avoid Large/Bulky Earrings or Vector-style accessories.
II. Watch
Preference: Mandatory item.
Prohibition: N/A.
III. Accent Colors
Preference: Added via accessories (e.g., scarves); Max 2 accent colors in total.
Prohibition: Avoid Bright/Vivid colors dominating the outfit.

View File

@@ -34,4 +34,19 @@ This stylist's outfits emphasize **comfort** and **layering** (creating depth).
3. **Fit Requirements**: All items should lean toward a **loose/oversize** fit to prioritize comfort; tailoring must be **clean and sharp**.
4. **Pattern Restriction**: Only **plaid/checkered or stripes** are acceptable as subtle accents; **strictly no florals**, unless an extremely minimal exception is made.
5. **Shoe/Bag Coordination**: Footwear must be **flat and casual** (white sneakers are preferred).
6. **Overall Balance**: When the upper body is complex (layered), the lower body should remain **simple**; the overall style is **neutral and polished**, avoiding highly feminine heels or boots.
6. **Overall Balance**: When the upper body is complex (layered), the lower body should remain **simple**; the overall style is **neutral and polished**, avoiding highly feminine heels or boots.
---
## Stylist Accessories Guide
### I. Gold Jewelry
Preference: Necklace, Bracelet, and Earrings must all be present and layered.
Prohibition: Avoid Large/Bulky Earrings or Vector-style accessories.
### II. Watch
Preference: Mandatory item.
Prohibition: N/A.
### III. Accent Colors
Preference: Added via accessories (e.g., scarves); Max 2 accent colors in total.
Prohibition: Avoid Bright/Vivid colors dominating the outfit.

View File

@@ -1,9 +0,0 @@
# Accessory Style Guide
This guide outlines accessory selection based on the desired overall aesthetic, emphasizing a balanced approach to metal tones.
# I. Metal Tone and Aesthetic Constraints
Jewelry Tone: Prefers Gold for a vintage and nostalgic feel.
Jewelry Tone: Prefers Silver for grungier looks.
Wear Preference: Wears both Gold and Silver, depending on the outfit's desired aesthetic.

View File

@@ -1,7 +1,7 @@
# Outfit Style Guide
This guide summarizes the preferred styling logic, colors, patterns, and structure for Vera's outfits, emphasizing harmony in color mixing and the use of statement bags.
# I. Core Preferences and Prohibitions
## I. Core Preferences and Prohibitions
Primary Colors: Most often wears Khakis, Black, Creams, and sometimes Burgundies.
Dominant Colors: Maximum of two dominant colors per outfit, handled with care.
@@ -20,5 +20,16 @@ Bags: Prefers Bigger bags and bags that make a statement. Specific examples incl
Prohibited Bags: Not a fan of crossbody or micro mini bags.
# II. Styling Pattern: Harmonious Statement
This stylist prioritizes a core color palette of neutrals and deep tones (Khakis, Black, Creams, Burgundies) and uses print mixing (e.g., different sized polka dots or florals) only when colors and shapes are harmonized. The overall look is anchored by comfortable shoes (loafers) and a large, functional, statement bag.
## II. Styling Pattern: Harmonious Statement
This stylist prioritizes a core color palette of neutrals and deep tones (Khakis, Black, Creams, Burgundies) and uses print mixing (e.g., different sized polka dots or florals) only when colors and shapes are harmonized. The overall look is anchored by comfortable shoes (loafers) and a large, functional, statement bag.
## Accessory Style Guide
This section outlines accessory selection based on the desired overall aesthetic, emphasizing a balanced approach to metal tones.
### I. Metal Tone and Aesthetic Constraints
Jewelry Tone: Prefers Gold for a vintage and nostalgic feel.
Jewelry Tone: Prefers Silver for grungier looks.
Wear Preference: Wears both Gold and Silver, depending on the outfit's desired aesthetic.