FunUI Apply Prompt Markup:
FunUIApplyPromptMarkup applies prompt instructions that were separated from your text by FunUI Prompt Markup, letting you guide generation without asking the text encoder to interpret special punctuation. It supports weighted phrases such as (word:1.5), timed phrases such as [phrase@2-4], and blends such as [a|b]. Weights and timed phrases work by adding an attention bias—a change in how the model attends to selected words—while blends modify the encoded text representation. This separation matters because an encoder can otherwise read markup as ordinary punctuation rather than as a generation instruction. The node relies on model-specific support to locate words in the encoded prompt and translate video times into the model’s internal positions. When it cannot establish that support, it reports that markup was not applied rather than silently claiming success. Weighted or timed attention calls use dense attention, including when SLA would otherwise be used, which can affect processing speed and memory use.
FunUI Apply Prompt Markup Input Parameters:
model
A required MODEL connection containing the generation model you want to use. The node clones this model, removes existing patches under the funui_markup. prefix from that clone, and installs the applicable weight and timing instructions. This prevents earlier FunUI markup patches from simply accumulating on the returned model. Blending alone does not require these attention modifications because it changes the conditioning instead. To use the model-side effects, continue your workflow with this node’s returned model rather than the original connection. There is no numeric minimum, maximum, default value, or selectable option defined for this input.
clip
A required CLIP connection identifying the text encoder associated with your encoded prompt. The node asks registered model modules for a compatible tokenizer so it can match phrases in the cleaned text to their encoded positions. The encoder is also passed to the blending operation when blend instructions are present. Use the encoder that produced the supplied positive conditioning; an unsupported encoder causes markup application to be refused, and an incompatible prompt layout can prevent the node from locating words correctly. Despite the socket name, support depends on the model modules’ capabilities rather than the name alone. There is no numeric minimum, maximum, default value, or selectable option defined for this input.
positive
A required CONDITIONING connection containing the encoded positive prompt. This should be created by encoding the clean text returned by FunUI Prompt Markup, not the original text containing markup punctuation. The node uses the first conditioning entry and its metadata to locate prompt tokens; blend instructions can replace that entry’s encoded text representation while retaining its metadata and the remaining conditioning entries. Weight and timing instructions instead act through the returned model, leaving the supplied conditioning unchanged unless blending also occurs. There is no numeric minimum, maximum, default value, or selectable option defined for this input.
latent
A required LATENT connection supplying the latent data for the generation. For timed phrases, the node passes the latent’s samples data and the requested start and end times to a model-specific capability that maps seconds to video positions. Connect the latent intended for the same generation so that timing placement corresponds to the clip being processed. If a timing window cannot be mapped, that timed phrase is skipped with a log message. The socket remains required even when your markup contains only weights or blends, although this implementation accesses its sample data only while processing timed phrases. There is no numeric minimum, maximum, default value, or selectable option defined for this input.
markup
A required FUNUI_MARKUP connection carrying the structured instructions produced by FunUI Prompt Markup. It includes the cleaned prompt and the parsed weighted, timed, and blended instructions, allowing this node to connect those instructions to the correct words after encoding. Connect it from the same FunUI Prompt Markup node whose clean text you encoded for positive; mixing instructions and conditioning from different prompts can prevent correct placement. If no weighted, timed, or blended instructions are present, the node returns the cloned model and unchanged conditioning with the status no markup. This is a custom data connection, not a text field, and the schema defines no numeric minimum, maximum, default value, or selectable options.
FunUI Apply Prompt Markup Output Parameters:
model
The returned MODEL is a clone of the supplied model with earlier funui_markup. patches removed and any successfully placed weight or timing instructions installed. Connect this output to the downstream sampling path to make those instructions available during generation. The attention modification targets supported packed self-attention calls that contain the prompt and subsequent streams; it does not apply the same timing mask to text-only refinement calls. If no markup is present or placement is refused, this output is still the cloned model, but without newly applied markup instructions.
positive
The returned CONDITIONING contains the positive prompt representation to use for sampling. If blends were successfully applied, the first conditioning entry contains the modified representation, while its metadata and any subsequent entries are preserved. If there are no successful blends, the original conditioning is returned unchanged. Connect this output alongside the returned model so that both conditioning-side blends and model-side attention changes can take effect when present.
status
A STRING summarizing what the node placed or why it could not apply the markup. Successful categories are reported as counts such as 1 blend(s), 2 weight(s), or 1 timed phrase(s), joined by commas when multiple categories apply. no markup means there were no instructions to process; nothing placeable means instructions existed but none resulted in a reported placement. A status beginning with not applied: explains a tokenizer or prompt-position compatibility failure. This status describes the setup performed by the node, not a guarantee that every later attention call will apply the instructions; runtime warnings can also appear in the logs.
FunUI Apply Prompt Markup Usage Tips:
- Build the workflow in this order: send your prompt through FunUI Prompt Markup, encode its
cleanoutput, and connect that conditioning plus its matchingmarkupoutput to FunUIApplyPromptMarkup. This keeps markup punctuation out of the encoder while preserving the instructions for later application. - Use both returned connections in your sampling workflow:
modelfor weights and timed phrases, andpositivefor blends. Using only one can leave part of your markup unapplied. - Start with one instruction, such as
(red scarf:1.5), and inspectstatusbefore combining weights, timed phrases, and blends. This makes compatibility and placement problems easier to isolate; the node itself provides no numeric weight controls or defined weight range. - For video timing such as
[a bird lands@2-4], use a time window within your intended clip and connect the matching generation latent. Timing depends on model-specific support and is mapped to internal video positions rather than being interpreted by the text encoder. - Allow for a different performance profile when adding weights or timed phrases. Biased attention calls run dense, so a workflow that normally benefits from SLA may require more time or memory; test a small number of marked phrases before expanding the prompt.
- Keep the cleaned text and its markup together when editing your workflow. Do not independently rewrite the cleaned text after parsing, because phrase placement depends on matching that text to its encoded representation.
- Avoid relying on FunUI Enhance Prompt to preserve markup during rewriting. The supplied enhancer code explicitly warns that markup does not survive a rewrite with enhancement enabled; disable rewriting when you need to preserve markup, or add your markup to the finished text before parsing and encoding it.
FunUI Apply Prompt Markup Common Errors and Solutions:
not applied: this text encoder is not one a model module can place words in
- Explanation: No registered model module supplied a compatible tokenizer for the connected
clip. The node cannot reliably find the marked words, so it returns without applying the markup. The log also states that the prompt still went in without it. - Solution: Confirm that
clipis the encoder used for your positive prompt and that the installed model integration supports prompt markup for that encoder. An arbitrary encoder connection is not sufficient; a compatible model module must provide the required support.
not applied: the encoded prompt does not match this text -- was the clean text from Prompt Markup what got encoded?
- Explanation: The model-specific prompt-position lookup could not match the conditioning layout to the cleaned text. Encoding the original marked-up prompt, changing the text after parsing, or connecting unrelated conditioning can cause this mismatch.
- Solution: Connect FunUI Prompt Markup’s
cleanoutput directly to your compatible encoder, then connect the resulting conditioning topositive. Use themarkupoutput from that same parsing node and the matchingclip.
a timed phrase's window 2-4s misses this clip; ignored
- Explanation: This is an example of the logged message; the numbers reflect your actual time window. The timing lookup returned no usable video window, so that phrase was skipped. A window outside the clip is one possible cause; unavailable model-specific timing support can also leave the lookup without a result.
- Solution: Check that the requested seconds fall within the intended clip, connect the correct latent, and verify that your model integration supports timed phrase placement. Inspect
statusto see whether other instructions were still placed.
this sequence is too short to hold the video the timed phrases were placed on; they are off for this call
- Explanation: During an attention call, the sequence is too short to accommodate the video positions calculated for the timed phrases. Timing instructions are disabled for that call, while ordinary weight instructions can still be included.
- Solution: Check that the latent and model belong to the same generation path and that the workflow uses a supported sequence layout. If the warning persists, remove timed markup to continue without timing and investigate the model integration.
markup failed inside attention and was dropped (...)
- Explanation: A runtime exception occurred while preparing or applying the attention modification. The parentheses contain the actual exception details. The node falls back to the original attention call so that this markup failure does not itself cost the generation step.
- Solution: Read the full logged exception, test a simpler prompt with one weighted phrase, and temporarily remove other attention modifications to check for compatibility issues. If it continues, report the exception together with your model, encoder, and workflow details.
nothing placeable
- Explanation: This status is not a crash. Instructions were present, but the node recorded no successful blend, weight, or timed-phrase placement. For example, all requested timing windows may have been skipped.
- Solution: Review the logs for timing warnings, confirm that the clean text and markup come from the same prompt, and test a single marked phrase with a supported encoder and model.
no markup
- Explanation: This is a normal status rather than an error. The supplied markup contains no weighted, timed, or blended instructions, so there is nothing to apply.
- Solution: If you expected an effect, add supported syntax such as
(word:1.5),[phrase@2-4], or[a|b]before FunUI Prompt Markup, and confirm that itsmarkupoutput reaches this node.
