ComfyUI Node

Time

The Time node — a placeholder until you add your own files

By itom0717·Created 6 months ago·Updated 6 months ago· 0
Time
    • text
    • id
    time
    time_custom

    This is the thinnest node in the pack, and it's useful precisely because of that. Time is one of nineteen file-based selector nodes in itom0717's Prompt String Selector, pointed at the time folder - same base class as Season and the rest, just a different directory. Out of the box it ships a single file, 01_none.txt, which is empty. So fresh-installed, its dropdown is basically ["01_none", "custom_input"], and the whole node is a no-op until you give it content.

    That's not a bug; it's the design. The node's job is "give me a time-of-day prompt from my library," and the library is yours to write.

    Make it do something

    Drop files into ComfyUI-Prompt-String-Selector/data/time/ and the dropdown fills itself:

    data/time/01_morning.txt  → "morning light,"
    data/time/02_noon.txt     → "harsh noon sun,"
    data/time/03_evening.txt  → "golden hour,"
    data/time/04_night.txt    → "night, neon glow,"
    

    Each file becomes a dropdown entry, sorted by the leading number in the filename, and that number becomes the node's id output. Reload the workflow after adding files - the dropdown is scanned at node load, so new files don't appear until you refresh.

    How it works

    Identical to every selector in the pack, so if you've read the Season article you already know this node. The dropdown comes from scanning data/time/*.txt; // and /* */ comments are stripped from file contents; trailing commas are trimmed and a ,\n re-added so the text chains into an aggregator; and choosing custom_input outputs whatever you typed in the multiline time_custom box instead of a file, with id 0.

    Inputs from the schema: time (required, enum dropdown) and time_custom (multiline STRING, left empty unless you use custom_input). Outputs: text (STRING) and id (INT).

    The id output is the quietly useful part here. Time of day is a natural thing to drive other nodes with - feed the id into a Prompt Switch to pick, say, an indoor/outdoor lighting prompt to match the hour. Then "night" in the prompt and "night" in the lighting stay in sync because they come from the same number.

    Install

    Same as the whole pack - no dependencies, no models, MIT:

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

    Restart ComfyUI, or install via ComfyUI Manager → Install via Git URL. First run: don't panic when the dropdown is one entry. Add files.

    The one gotcha

    Because it starts nearly empty, Time is also the node most likely to be dropped into a workflow "for later" and forgotten - and the empty string silently contributes nothing to your prompt. That's fine until you reshuffle an aggregator's inputs and wonder where "morning light" went. If a selector outputs nothing, check the folder first, then the wiring.

    CategoryPrompt String Selector

    Inputs (2)

    NameTypeDefaultDescription
    timeCOMBO2 options: 01_none, custom_input
    time_customSTRING

    Outputs (2)

    NameTypeDescription
    textSTRING
    idINT