Skip to content

[Bug] Metadata Analysis fails to parse PromptManager prompts #75

@EricZhou05

Description

@EricZhou05

Versions

  • ComfyUI: 265adad (v0.3.68)
  • PromptManager: 3.0.21

Bug Description

The Advanced Metadata Analysis feature fails to correctly parse metadata under specific conditions.

Symptoms

Scenario 1: Using PromptManager node (Bugged)

  • When using the PromptManager (CLIP Encoding Node) for prompts.
  • Result: Advanced Metadata Analysis shows [none] for Positive/Negative prompts AND [none] for the Checkpoint resource.
Click to expand: Incorrectly Parsed Image Metadata (JSON)
{"1": {"inputs": {"seed": 480655185510613, "steps": 25, "cfg": 5.5, "sampler_name": "euler_ancestral", "scheduler": "normal", "denoise": 0.8, "model": ["20", 0], "positive": ["39", 0], "negative": ["40", 0], "latent_image": ["36", 0]}, "class_type": "KSampler", "_meta": {"title": "K\u91c7\u6837\u5668"}}, "6": {"inputs": {"samples": ["1", 0], "vae": ["20", 2]}, "class_type": "VAEDecode", "_meta": {"title": "VAE\u89e3\u7801"}}, "7": {"inputs": {"filename_prefix": "T2I (Default)", "images": ["6", 0]}, "class_type": "SaveImage", "_meta": {"title": "\u4fdd\u5b58\u56fe\u50cf"}}, "8": {"inputs": {"stop_at_clip_layer": -2, "clip": ["20", 1]}, "class_type": "CLIPSetLastLayer", "_meta": {"title": "\u8bbe\u7f6eCLIP\u6700\u540e\u4e00\u5c42"}}, "20": {"inputs": {"ckpt_name": "Anime\\Illustrious\\Nova-Anime-XL_ILv13.safetensors", "prompt": "[none]", "example": "[none]"}, "class_type": "CheckpointLoader|pysssss", "_meta": {"title": "Checkpoint\u52a0\u8f7d\u5668(pysss)"}}, "36": {"inputs": {"dimensions": " 832 x 1216  (portrait)", "clip_scale": 2.0, "batch_size": 1}, "class_type": "SDXL Empty Latent Image (rgthree)", "_meta": {"title": "SDXL\u7a7aLatent\u56fe\u50cf"}}, "39": {"inputs": {"text": "masterpiece, best quality, source_anime, 1girl, cute, cat_ears, child, loli, pink_hair, frilled_dress, \nsmile, \nwhite_background, \nartist:komachi_pochi, (artist:amashiro_natsuki:0.7)", "category": "", "tags": "", "search_text": "", "prepend_text": "masterpiece, best quality, ", "append_text": "", "clip": ["8", 0]}, "class_type": "CLIPTextEncode", "_meta": {"title": "Prompt Manager", "original_class_type": "PromptManager"}, "is_changed": ["3d3aed1aaed2b4397d6a0a2672866e673fb8f4be08c804bc84416a89a64171c7"]}, "40": {"inputs": {"text": "masterpiece, best quality, source_anime, 1girl, cute, cat_ears, child, loli, pink_hair, frilled_dress, \nsmile, \nwhite_background, \nartist:komachi_pochi, (artist:amashiro_natsuki:0.7)", "category": "", "tags": "", "search_text": "", "prepend_text": "bad quality, worst quality, worst detail, crayon, ", "append_text": "", "clip": ["8", 0]}, "class_type": "CLIPTextEncode", "_meta": {"title": "Prompt Manager", "original_class_type": "PromptManager"}, "is_changed": ["901d3734f8d87db3e1146b3c9bc497932dd703f38ae4247513d9550264272b6d"]}}

Scenario 2: Using stock CLIPTextEncode node (Partially Works)

  • When using the standard ComfyUI CLIPTextEncode node for prompts.
  • Result: Advanced Metadata Analysis correctly parses the Positive/Negative prompts.
  • Result: It still shows [none] for the Checkpoint resource.
Click to expand: Partially Parsed Image Metadata (JSON)
{"1": {"inputs": {"seed": 480655185510613, "steps": 25, "cfg": 5.5, "sampler_name": "euler_ancestral", "scheduler": "normal", "denoise": 0.8, "model": ["20", 0], "positive": ["50", 0], "negative": ["51", 0], "latent_image": ["36", 0]}, "class_type": "KSampler", "_meta": {"title": "K\u91c7\u6837\u5668"}}, "6": {"inputs": {"samples": ["1", 0], "vae": ["20", 2]}, "class_type": "VAEDecode", "_meta": {"title": "VAE\u89e3\u7801"}}, "7": {"inputs": {"filename_prefix": "T2I (Default)", "images": ["6", 0]}, "class_type": "SaveImage", "_meta": {"title": "\u4fdd\u5b58\u56fe\u50cf"}}, "8": {"inputs": {"stop_at_clip_layer": -2, "clip": ["20", 1]}, "class_type": "CLIPSetLastLayer", "_meta": {"title": "\u8bbe\u7f6eCLIP\u6700\u540e\u4e00\u5c42"}}, "20": {"inputs": {"ckpt_name": "Anime\\Illustrious\\Nova-Anime-XL_ILv13.safetensors", "prompt": "[none]", "example": "[none]"}, "class_type": "CheckpointLoader|pysssss", "_meta": {"title": "Checkpoint\u52a0\u8f7d\u5668(pysss)"}}, "36": {"inputs": {"dimensions": " 832 x 1216  (portrait)", "clip_scale": 2.0, "batch_size": 1}, "class_type": "SDXL Empty Latent Image (rgthree)", "_meta": {"title": "SDXL\u7a7aLatent\u56fe\u50cf"}}, "50": {"inputs": {"text": "masterpiece, best quality, \nsource_anime, 1girl, cute, cat_ears, child, loli, pink_hair, frilled_dress, \nsmile, \nwhite_background, \nartist:komachi_pochi, (artist:amashiro_natsuki:0.7)", "clip": ["8", 0]}, "class_type": "CLIPTextEncode", "_meta": {"title": "CLIP\u6587\u672c\u7f16\u7801"}}, "51": {"inputs": {"text": "bad quality, worst quality, worst detail, crayon, \n3d, 1boy, BOY, crowd, panties, white_panties, ", "clip": ["8", 0]}, "class_type": "CLIPTextEncode", "_meta": {"title": "CLIP\u6587\u672c\u7f16\u7801"}}, "promptmanager_text": {"class_type": "CLIPTextEncode", "inputs": {"text": "masterpiece, best quality, source_anime, 1girl, cute, cat_ears, child, loli, pink_hair, frilled_dress, \nsmile, \nwhite_background, \nartist:komachi_pochi, (artist:amashiro_natsuki:0.7)"}, "_meta": {"original_class_type": "PromptManager", "virtual": true}}}

Analysis / Conclusion

This suggests two separate issues:

  1. Prompt Parsing Bug: The Advanced Metadata Analysis tool seems unable to read the metadata format generated by its own PromptManager node (Scenario 1). However, it can successfully parse the data from the stock CLIPTextEncode node (Scenario 2).
  2. Compatibility Issue: The analysis tool does not seem to recognize the CheckpointLoader|pysssss custom node. This causes the "Resources used" (Checkpoint) to fail in both scenarios.
Image Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions