✨ feat(automation): 新增自动化运营防重复机制与统计功能

- 新增操作历史记录,防止对同一笔记重复评论、点赞、收藏和回复
- 新增每日操作统计与限额管理,包含评论、点赞、收藏、发布和回复的独立上限
- 新增错误冷却机制,连续错误后自动暂停操作一段时间
- 新增运营时段控制,允许设置每日自动运营的开始和结束时间
- 新增收藏功能,支持一键收藏和定时自动收藏
- 新增随机人设池,提供25种预设小红书博主风格人设,支持随机切换
- 扩充主题池、风格池和评论关键词池,增加运营多样性
- 优化自动化调度器,显示下次执行时间和实时统计摘要
- 优化发布功能,增加本地备份机制,失败时保留文案和图片

🐛 fix(llm): 修复绘图提示词中的人物特征要求

- 在绘图提示词模板中明确要求人物必须是东亚面孔的中国人
- 添加具体的人物特征描述,如黑发、深棕色眼睛、精致五官等
- 禁止出现西方人或欧美人特征
- 调整整体画面风格偏向东方审美、清新淡雅和小红书风格
This commit is contained in:
2026-02-09 20:50:05 +08:00
parent 087d23f3fb
commit dbe695b551
3 changed files with 578 additions and 79 deletions
+6 -2
View File
@@ -27,11 +27,13 @@ PROMPT_COPYWRITING = """
【绘图 Prompt】: 【绘图 Prompt】:
生成对应的 Stable Diffusion 英文提示词,适配 JuggernautXL 模型,强调: 生成对应的 Stable Diffusion 英文提示词,适配 JuggernautXL 模型,强调:
- 人物要求(最重要!):如果画面中有人物,必须是东亚面孔的中国人,使用 asian girl/boy, chinese, east asian features, black hair, dark brown eyes, delicate facial features, fair skin, slim figure 等描述,绝对禁止出现西方人/欧美人特征
- 质量词:masterpiece, best quality, ultra detailed, 8k uhd, high resolution - 质量词:masterpiece, best quality, ultra detailed, 8k uhd, high resolution
- 光影:natural lighting, soft shadows, studio lighting, golden hour 等(根据场景选择) - 光影:natural lighting, soft shadows, studio lighting, golden hour 等(根据场景选择)
- 风格:photorealistic, cinematic, editorial photography, ins style - 风格:photorealistic, cinematic, editorial photography, ins style, chinese social media aesthetic
- 构图:dynamic angle, depth of field, bokeh 等 - 构图:dynamic angle, depth of field, bokeh 等
- 细节:detailed skin texture, sharp focus, vivid colors - 细节:detailed skin texture, sharp focus, vivid colors
- 审美偏向:整体画面风格偏向东方审美、清新淡雅、小红书风格
注意:不要使用括号权重语法,直接用英文逗号分隔描述。 注意:不要使用括号权重语法,直接用英文逗号分隔描述。
返回 JSON 格式: 返回 JSON 格式:
@@ -112,9 +114,11 @@ PROMPT_COPY_WITH_REFERENCE = """
【绘图 Prompt】: 【绘图 Prompt】:
生成 Stable Diffusion 英文提示词,适配 JuggernautXL 模型: 生成 Stable Diffusion 英文提示词,适配 JuggernautXL 模型:
- 人物要求(最重要!):如果画面中有人物,必须是东亚面孔的中国人,使用 asian girl/boy, chinese, east asian features, black hair, dark brown eyes, delicate facial features, fair skin, slim figure 等描述,绝对禁止出现西方人/欧美人特征
- 必含质量词:masterpiece, best quality, ultra detailed, 8k uhd - 必含质量词:masterpiece, best quality, ultra detailed, 8k uhd
- 风格:photorealistic, cinematic, editorial photography - 风格:photorealistic, cinematic, editorial photography, chinese social media aesthetic
- 光影和细节:natural lighting, sharp focus, vivid colors, detailed skin texture - 光影和细节:natural lighting, sharp focus, vivid colors, detailed skin texture
- 审美偏向:整体画面风格偏向东方审美、清新淡雅、小红书风格
- 用英文逗号分隔,不用括号权重语法。 - 用英文逗号分隔,不用括号权重语法。
返回 JSON 格式: 返回 JSON 格式:
+568 -75
View File
File diff suppressed because it is too large Load Diff
+4 -2
View File
@@ -12,14 +12,16 @@ logger = logging.getLogger(__name__)
SD_TIMEOUT = 900 # 图片生成可能需要较长时间 SD_TIMEOUT = 900 # 图片生成可能需要较长时间
# 默认反向提示词(针对 JuggernautXL / SDXL 优化) # 默认反向提示词(针对 JuggernautXL / SDXL 优化,偏向东方审美)
DEFAULT_NEGATIVE = ( DEFAULT_NEGATIVE = (
"nsfw, nudity, lowres, bad anatomy, bad hands, text, error, missing fingers, " "nsfw, nudity, lowres, bad anatomy, bad hands, text, error, missing fingers, "
"extra digit, fewer digits, cropped, worst quality, low quality, normal quality, " "extra digit, fewer digits, cropped, worst quality, low quality, normal quality, "
"jpeg artifacts, signature, watermark, blurry, deformed, mutated, disfigured, " "jpeg artifacts, signature, watermark, blurry, deformed, mutated, disfigured, "
"ugly, duplicate, morbid, mutilated, poorly drawn face, poorly drawn hands, " "ugly, duplicate, morbid, mutilated, poorly drawn face, poorly drawn hands, "
"extra limbs, fused fingers, too many fingers, long neck, username, " "extra limbs, fused fingers, too many fingers, long neck, username, "
"out of frame, distorted, oversaturated, underexposed, overexposed" "out of frame, distorted, oversaturated, underexposed, overexposed, "
"western face, european face, caucasian, deep-set eyes, high nose bridge, "
"blonde hair, red hair, blue eyes, green eyes, freckles, thick body hair"
) )