RedditPP Mascot

RedditPP

r/StableDiffusion • … • u/robomar_ai_art

How I finally got KJ Prompt Builder working properly with JSON prompts

Hey everyone,

I was struggling with the KJ Prompt Builder for a while, so I wanted to share the method that finally worked for me. Maybe it helps someone else who is stuck with the same problem.

The trick is to use an LLM to generate the prompt directly in the correct JSON structure that KJ Prompt Builder expects.

What I did was create a system prompt for the LLM. Now I only need to describe what image I want, and the LLM automatically writes the full JSON prompt while keeping the correct structure.

Then the workflow is simple:

1. Describe the image you want to the LLM. 2. Let the LLM generate the prompt in JSON format. 3. Copy the full JSON. 4. Go to the KJ Prompt Builder node. 5. Click the **Paste** button. 6. Everything fills in automatically.

Before this, I was trying to manually edit the fields and it was annoying/confusing. But once the JSON structure is correct, the Paste button handles everything.

The most important part is that the LLM must not just write a normal prompt. It has to keep the exact JSON structure required by KJ Prompt Builder.

So basically, instead of fighting with the node manually, I let the LLM prepare the whole structured prompt for me, then I paste it into KJ Prompt Builder.

This fixed the workflow for me and now it works perfectly.

— 0