π Z2J Mood
Emotion as a seed β Z2J Mood for reproducible atmosphere
- text
Mood is the least-prompted dimension of an image and the one people feel most when it's missing. "Melancholy, subdued, with an undercurrent of unease" is doing a lot of emotional work that no individual tag can carry. Z2J Mood generates that layer deterministically - one of the most pleasant surprises in the ComfyUI-Zero2JSON pack, because it turns "what's this image about" into a reproducible knob instead of a feeling you have to put into words at 2am.
It sits in the style family of the pack. The generated phrase pairs a primary emotion with a secondary one, an intensity, and a descriptor - so you get structured, layered atmosphere rather than a single flat adjective. In the FLUX2-JSON workflow it feeds the mood/atmosphere slot and lets the model's LLM-style encoder actually chew on the emotional register, which is exactly the kind of descriptive block that structured prompting does well.
How it works
Standard position-as-seed core: (seed, prompt_index, slot) hashed with xxhash32, then a template and one word from each pool. The mood_default.json profile has 4 templates over four pools - emotion (24), secondary_emotion (12), intensity (12), descriptor (10) - about 138,000 combinations. That's a real emotional vocabulary: primary emotion, a complicating secondary, how hard to push it, and a textural descriptor.
The inputs that matter
seed- world seed.prompt_index- position coordinate; farm this to walk the emotional space.profile- dropdown ofmood_*.jsonfiles; add your own toprofiles/and restart.prefix/suffix- anchors around the mood phrase.mood_valence- a filter dropdown (positive / negative / neutral / tense / peaceful). Read the small print: in v1.0.0 as shipped this input is accepted but ignored by the generator. It doesn't constrain anything yet; check for a newer release.
Output is a single text string.
Install
One repo, all seventeen nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/ComfyUI-Zero2JSON
cd ComfyUI-Zero2JSON
pip install -r requirements.txt
Restart ComfyUI. The only dependency is xxhash>=3.0.0 - no models, no API, nothing heavy. Manager users: search "ComfyUI-Zero2JSON".
Where people get burned
Mood and lighting overlap more than people expect - a mood phrase like "foreboding" and a lighting phrase like "harsh key light from below" are telling the model the same story twice, and stacking them is usually fine but occasionally over-eggs it into camp. If a mood output feels overwrought, drop the lighting node's mood channel rather than the mood node. Also: mood words are weak if the scene doesn't support them - "serene" on a burning city reads as a prompt bug, not a subtle choice. Keep the generated mood and scene in the same emotional world.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00β4294967295 | World seed for deterministic generation |
| prompt_index | INT | 00β4294967295 | Position in infinite prompt space |
| profileopt | COMBO | mood_default.json | Select vocabulary profile |
| prefixopt | STRING | Text to prepend to generated prompt | |
| suffixopt | STRING | Text to append to generated prompt | |
| mood_valenceopt | COMBO | any | Emotional valence hint |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | β |