Mie Loop Param Get String ๐
Read the current loop value as a STRING
- loop_ctx
- STRING
The string version of the loop getter. Inside a MieNodes loop, this node pulls the current iteration's value out of the loop_ctx as a STRING - which is the one you'll probably use most, because the most common thing people loop over is a list of prompts.
Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under the ๐ Loop submenu.
Why you'd reach for it
Picture the classic case: you've got ten prompts and you want one image for each. In MieLoopStart you set param_type to string, drop your ten prompts into string_list (one per line), and then MieLoopParamGetString hands you the current prompt each pass, ready to wire into your CLIP text encode. No copy-pasting ten sampler chains, no editing the prompt field and re-queuing over and over. Same idea works for a list of filenames, styles, character names, or any batch of text you want to fan out over.
How it works
The loop context holds each pass's value under a key (default value). MieLoopParamGetString looks it up and returns it as text. Keep the key at value for the primary iterated string; point it at a custom key to read any string you seeded through initial_state_json or wrote back via MieLoopEnd's state_json.
The inputs and outputs that matter
loop_ctx(MIE_LOOP_CTX) - the loop context.key(STRING, defaultvalue) - which entry to read.valueis the current iterated string; a custom name reads something else out of the state bag.default_value(STRING, default empty) - returned when the key is missing, so an unset key gives you an empty string instead of an error.- Output
STRING- this pass's text.
Installing it
ComfyUI Manager โ search ComfyUI-MieNodes โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. No model downloads or heavy dependencies. Under ๐ MieNodes โ ๐ Loop.
Common issues
My prompts split in weird places. In MieLoopStart, the string_list is newline-separated - one prompt per line. If a single prompt wraps across lines it'll be read as two items. Keep each prompt on its own line.
Empty string coming out. Either the key doesn't match (value for the iterated item, exact spelling for custom keys) or your loop's param_type isn't string. The empty output is the default_value fallback doing its job.
I want structured data, not flat text. If you're looping over objects rather than plain strings, run MieLoopStart in json mode and read the item as a string here, then parse it - or collect results with MieLoopCollectJSON. This node returns raw text; it doesn't parse it for you.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| loop_ctx | MIE_LOOP_CTX | โ | |
| key | STRING | value | โ |
| default_value | STRING | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | โ |