Photo Magazine Parser
Turn your LLM's magazine JSON into a ready-to-generate prompt list
- prompts
The hard part of the "AI magazine" pipeline isn't generating the images - it's that a magazine isn't one image, it's a cover plus interior pages, each needing its own prompt, arranged in a structure. PhotoMagazineParser is the bridge that makes the LLM part manageable: you ask a strong LLM for a magazine plan in JSON, and this node extracts the per-page image prompts so they can feed your generation loop. It's the unglamorous but necessary translator between "LLM thinks in JSON" and "ComfyUI loops over prompts."
How it works
The node expects llm_json_output - a JSON structure with magazine_info, a cover object, a pages list, and a story_page, each page carrying an image_prompt field. It parses the JSON (tolerantly - it strips markdown code fences and even tries to find a JSON object buried in prose) and pulls out every image_prompt in order: cover first, then each interior page, then the story page. The output is a list of prompt strings, one per image you need to generate, ready to feed a batch loop.
The tolerance matters more than it sounds: LLMs rarely emit clean JSON on the first try, and this node's fallback (find the first { … last } and re-parse) rescues a lot of otherwise-failed runs. If parsing fails entirely, it returns an empty list rather than crashing the graph.
Inputs and output
One input: llm_json_output (STRING) - paste or wire the LLM's JSON response. One output: prompts (STRING list) - the ordered image prompts. That list plugs directly into the pack's prompt-injection/generation machinery, or any batch prompt loop.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/dseditor/ComfyUI-ListHelper
Restart ComfyUI; find it under DesignPack. No models, no extra dependencies - pure JSON extraction. ComfyUI Manager: search "ComfyUI-ListHelper".
The honest take
This node only makes sense as part of the full magazine workflow: LLM plans the magazine → this extracts prompts → generate each page → PhotoMagazineMaker typesets the PDF. Standalone, it's a JSON-to-list extractor, and there are generic ones. But the pairing with PhotoMagazineMaker is the trick - the two share a JSON schema, so the round-trip is consistent by design. The practical gotcha is the quality of the input: a weak LLM produces magazine JSON with generic, repetitive image_prompt values, and no parser can fix that. Give it a good planner model and the JSON schema in your system prompt, and the extraction becomes the reliable middle step it's meant to be.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| llm_json_output | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompts | STRING | — |