Files
ZImageTurbo/config_qwen.yaml
2026-03-26 22:07:32 +08:00

56 lines
3.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ========== LLM 配置(用于古诗词分析) ==========
llm:
base_url: "https://api.siliconflow.cn/v1" # 兼容 OpenAI API 的端点地址
api_key: "sk-rooopitditvwbgdjxnkywgvdhsepfucbxcwoagickbnrxqyo" # API 密钥,也可通过环境变量 LLM_API_KEY 设置
model: "deepseek-ai/DeepSeek-V3.2" # 部署的模型名称
temperature: 0.9
max_tokens: 8192
# ========== Qwen-Image API 图片生成配置 ==========
image:
base_url: "https://api.siliconflow.cn/v1" # SiliconFlow API 端点
api_key: "sk-rooopitditvwbgdjxnkywgvdhsepfucbxcwoagickbnrxqyo" # 图片生成 API 密钥(留空则复用 LLM 的 api_key
# 也可通过环境变量 IMAGE_API_KEY 设置
model: "Qwen/Qwen-Image" # SiliconFlow 上的模型名称
# --- 图片尺寸 ---
# Qwen-Image 推荐分辨率(与 Z-Image-Turbo 不同,请使用以下预设):
size_preset: "square" # 尺寸预设,可选值:
# square — 1328×1328 正方形 1:1
# phone — 928×1664 手机壁纸 9:16
# phone_hd — 1056×1584 手机壁纸 2:3高清
# desktop — 1664×928 电脑壁纸 16:9
# desktop_hd — 1584×1056 电脑壁纸 3:2高清
# landscape — 1472×1140 横版 4:3
# portrait — 1140×1472 竖版 3:4
# custom — 使用下方 height/width 自定义尺寸
height: 1328 # 仅 size_preset: custom 时生效
width: 1328 # 仅 size_preset: custom 时生效
# --- 生成参数 ---
num_inference_steps: 20 # 推理步数1-100默认 20步数越多质量越高但越慢
guidance_scale: 7.5 # 引导系数0-20默认 7.5,越高越贴近 prompt
# cfg: # CFG 值0.1-20仅在需要图片中渲染文字时启用
# 官方推荐50 步 + CFG 4.0 用于文字渲染场景
# CFG 设置过小时几乎无法生成文字
seed: -1 # -1 表示随机种子,设定固定值可复现结果
images_per_prompt: 2 # 每个 prompt 生成几张图不同种子1-4
# --- 提示词配置 ---
negative_prompt: "" # 全局负向提示词(可选),会与 LLM 为每幅画面生成的
# 专属 negative_prompt 合并LLM 生成的在前,全局的在后)
# 示例:"低分辨率, 低质量, 肢体变形, 手指畸形, 过度饱和"
prompt_language: "zh" # zh | en — 发送给 Qwen-Image 的 prompt 语言
# zh: 使用中文 promptQwen-Image 对中文支持优秀)
# en: 使用英文 prompt
# --- 网络配置 ---
max_retries: 3 # API 调用失败时的最大重试次数
request_timeout: 180 # 单次 API 请求超时时间(秒)
# ========== 输出配置 ==========
output:
dir: "./output_qwen" # 图片输出目录
filename_prefix: "poem" # 文件名前缀
save_prompts: true # 是否保存 prompt 到 txt 文件