# 本地大模型配置文件
models:
  # VLM模型（用于图片理解和修复）
  qwen2_vl:
    name: "Qwen2.5-VL-72B-Instruct-AWQ"
    api_base: "http://10.192.72.12:9991/v1"
    api_key: "${YUSYS_MULTIMODAL_API_KEY}"
    model_id: "Qwen2.5-VL-72B-Instruct-AWQ"
    type: "vlm"
    default_params:
      temperature: 0.1
      max_tokens: 4096
      timeout: 180
    
  llava:
    name: "LLaVA-v1.6-34B"
    api_base: "http://localhost:11434/v1"
    api_key: ""
    model_id: "llava:34b"
    type: "vlm"
    default_params:
      temperature: 0.1
      max_tokens: 4096
      timeout: 180

  cogvlm:
    name: "CogVLM2-19B"
    api_base: "http://localhost:11434/v1"
    api_key: ""
    model_id: "cogvlm2:19b"
    type: "vlm"
    default_params:
      temperature: 0.1
      max_tokens: 4096
      timeout: 180

  # 图片生成模型
  dashscope_wanx:
    name: "通义万相-风格重绘"
    api_base: "https://dashscope.aliyuncs.com/api/v1/services/aigc/image-generation/generation"
    api_key: "${DASHSCOPE_API_KEY}"
    model_id: "wanx-style-repaint-v1"
    type: "image_generation"
    generation_type: "style_repaint"  # 风格重绘
    default_params:
      style_index: 6
      timeout: 300
      poll_interval: 5
  
  modelscope_qwen:
    name: "ModelScope-Qwen文生图"
    api_base: "https://api-inference.modelscope.cn/v1/images/generations"
    api_key: "${MODELSCOPE_API_KEY}"
    model_id: "Qwen/Qwen-Image"
    type: "image_generation"
    generation_type: "text_to_image"  # 文生图
    default_params:
      timeout: 300
      poll_interval: 5

  dashscope_flux:
    name: "通义万相-FLUX"
    api_base: "https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis"
    api_key: "${DASHSCOPE_API_KEY}"
    model_id: "flux-schnell"
    type: "image_generation"
    generation_type: "text_to_image"  # 文生图
    default_params:
      size: "1024*1024"
      timeout: 300
      poll_interval: 5

  # 新增背景生成模型
  dashscope_background:
    name: "通义万相-背景生成"
    api_base: "https://dashscope.aliyuncs.com/api/v1/services/aigc/background-generation/generation/"
    api_key: "${DASHSCOPE_API_KEY}"
    model_id: "wanx-background-generation-v2"
    type: "image_generation"
    generation_type: "background_generation"  # 背景生成
    default_params:
      model_version: "v3"
      n: 1
      timeout: 300
      poll_interval: 5

# 提示词模板
prompts:
  # 原有的VLM提示词...
  photo_analysis:
    name: "照片分析"
    type: "vlm"
    template: |
      请仔细观察这张照片，分析以下内容：
      1. 照片的拍摄环境和背景
      2. 人物的外貌特征和着装
      3. 照片的拍摄时间推测（基于服装、环境等）
      4. 照片的保存状况（是否有破损、褪色等）
      5. 照片的历史价值和意义
      
      请用中文详细描述，分条列出分析结果。

  # 图片生成提示词
  photo_style_repaint:
    name: "照片风格重绘"
    type: "image_generation"
    compatible_models: ["dashscope_wanx"]
    template: |
      对输入的照片进行风格重绘，保持人物特征和基本构图，应用指定的艺术风格。
      风格选项：0=复古漫画, 1=3D童话, 2=二次元, 3=小清新, 4=未来科技, 5=国画古风, 6=油画质感

  text_to_image_simple:
    name: "简单文生图"
    type: "image_generation"
    compatible_models: ["modelscope_qwen", "dashscope_flux"]
    template: |
      根据文本描述生成高质量图片。请提供详细的场景描述、人物特征、光线效果和艺术风格要求。

  photo_restoration:
    name: "AI照片修复"
    type: "image_generation"
    compatible_models: ["dashscope_wanx"]
    template: |
      修复老旧照片：去除折痕、划痕、污渍，提升清晰度，保持原有人物特征。
      {prompt}

  # 新增背景生成提示词
  background_classroom:
    name: "教室背景生成"
    type: "image_generation"
    compatible_models: ["dashscope_background"]
    template: |
      1980年代中国大学教室场景：后方是深绿色黑板，略有粉笔痕迹，前方是深褐色木质课桌，教室光线明亮柔和，营造温馨的学习氛围
      
  background_landscape:
    name: "风景背景生成"
    type: "image_generation"
    compatible_models: ["dashscope_background"]
    template: |
      {prompt}
      
  background_studio:
    name: "影棚背景生成"
    type: "image_generation"
    compatible_models: ["dashscope_background"]
    template: |
      专业摄影影棚背景，柔和灯光，纯色或渐变背景，适合人像摄影

# 预设风格配置
style_presets:
  dashscope_styles:
    - {index: 0, name: "复古漫画", description: "复古漫画风格，线条清晰，色彩饱和"}
    - {index: 1, name: "3D童话", description: "3D童话风格，梦幻可爱，立体感强"}
    - {index: 2, name: "二次元", description: "二次元动漫风格，日式插画感"}
    - {index: 3, name: "小清新", description: "小清新风格，色彩柔和，清新自然"}
    - {index: 4, name: "未来科技", description: "未来科技风格，金属质感，科幻氛围"}
    - {index: 5, name: "国画古风", description: "中国风水墨画风格，古典雅致"}
    - {index: 6, name: "油画质感", description: "油画质感，色彩丰富，艺术感强"}

# 默认配置
default:
  vlm_model: "qwen2_vl"
  image_gen_model: "dashscope_wanx"
  prompt: "photo_analysis"
  style_index: -1  # -1表示使用使用自定义风格, 0-6表示使用对应风格