koishi-plugin-hhs-huatu 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +4 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2393,11 +2393,13 @@ function apply(ctx, config) {
2393
2393
  ctx.logger.info(`[Characters Debug] 解析结果: ${JSON.stringify(characters)}`);
2394
2394
  }
2395
2395
  if (Array.isArray(characters) && characters.length > 0) {
2396
- parameters.use_coords = true;
2397
- parameters.v4_prompt.use_coords = true;
2396
+ const hasCoords = characters.some((char) => char.position !== void 0);
2397
+ parameters.use_coords = hasCoords;
2398
+ parameters.v4_prompt.use_coords = hasCoords;
2398
2399
  if (config.debugLog) {
2399
2400
  ctx.logger.info(`[Characters Debug] 处理前 - base_caption: ${parameters.v4_prompt.caption.base_caption}`);
2400
2401
  ctx.logger.info(`[Characters Debug] 处理前 - char_captions 长度: ${parameters.v4_prompt.caption.char_captions.length}`);
2402
+ ctx.logger.info(`[Characters Debug] 检测到坐标输入: ${hasCoords},use_coords 设置为: ${hasCoords}`);
2401
2403
  }
2402
2404
  for (const character of characters) {
2403
2405
  if (!character.prompt) continue;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-hhs-huatu",
3
3
  "description": "Generate images by diffusion models",
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [