ComfyUI Node

Season

The Season node, or why this pack keeps prompts in text files

By itom0717·Created 6 months ago·Updated 6 months ago· 0
Season
    • text
    • id
    season
    season_custom

    The entire idea of itom0717's Prompt String Selector pack is that prompts shouldn't live as a wall of text buried in your workflow. They live as small .txt files in categorized folders - character, art style, clothing, season, time - and nodes read those folders into dropdowns. Season is one of those selector nodes, pointed at the season folder, and it's the cleanest way to see the whole pattern.

    What you get out of the box

    It ships with four entries: 01_Spring, 02_Summer, 03_Autumn, 04_Winter, each a text file whose contents are as minimal as it gets (spring,, summer,…). Pick one from the dropdown and the node outputs two things: the file's text, and the filename's leading number as an id. Wire the text into the pack's Aggregator or a CLIP text encode; feed the id somewhere else if you want the season to drive other logic. There's a genuinely cute cross-node use here: the pack's clothing folders are literally organized by season (clothing1 = spring through clothing4 = winter), so Season's id can drive a Prompt Switch that picks the matching wardrobe prompt. Two dropdowns, one season number, coordinated wardrobe.

    How it works

    Read the source and the mechanism is pleasant and predictable:

    • The dropdown is built when the node loads by scanning data/season/*.txt, sorted by the number prefix in each filename. 01_Springid 1, 04_Winterid 4. The leading number becomes the INT output.
    • Files can contain // line comments and /* ... */ block comments, which are stripped from the output - your way of leaving yourself notes without polluting the prompt.
    • Trailing commas are trimmed and a ,\n re-added to the selected text, so it slots into a comma-separated prompt string without you thinking about commas. (The author's own files already end in a comma; the node normalizes that away.)
    • Pick custom_input from the dropdown and the multiline season_custom textbox is what gets output instead, with id 0. That's the escape hatch when you don't want to bother creating a file.

    Inputs and outputs that matter

    From the schema: season (required, the enum dropdown) and season_custom (required in the schema, but you leave it empty unless you're using custom_input). Outputs are text (STRING) and id (INT). That's the whole surface.

    Adding your own seasons

    Drop 05_CherryBlossom.txt into ComfyUI-Prompt-String-Selector/data/season/ and reload the workflow - the dropdown is built at node load, so a new file won't appear until you refresh or reopen. Filenames should start with digits plus an underscore, because that prefix is what becomes the id. If the folder is ever empty, the dropdown collapses to just custom_input rather than erroring.

    Install

    Same as the whole pack - pure Python, no requirements, no model downloads, MIT:

    cd ComfyUI/custom_nodes
    git clone https://github.com/itom0717/ComfyUI-Prompt-String-Selector
    

    Restart ComfyUI, or use ComfyUI Manager → Install via Git URL. Want the data folder somewhere else (OneDrive, a second drive)? The pack reads a data_path override from config.json - just remember JSON wants Windows backslashes doubled.

    One honest caveat

    This whole style of prompt management is built around the comma-tag SDXL lineage - Illustrious, Pony, that world - where prompts are token bags and appending spring, changes the image in predictable ways. On the newer LLM-encoded models, "structuring the prompt in blocks" is still a good habit but the vocabulary does different things. The mechanism here is model-agnostic; the payoff is not.

    CategoryPrompt String Selector

    Inputs (2)

    NameTypeDefaultDescription
    seasonCOMBO5 options: 01_Spring, 02_Summer, 03_Autumn, 04_Winter, custom_input
    season_customSTRING

    Outputs (2)

    NameTypeDescription
    textSTRING
    idINT