Skip to content

Add trigger word support for LoRAs in XY Plot workflows - #369

Draft
jags111 with Copilot wants to merge 8 commits into
mainfrom
copilot/add-trigger-words-for-loras
Draft

Add trigger word support for LoRAs in XY Plot workflows#369
jags111 with Copilot wants to merge 8 commits into
mainfrom
copilot/add-trigger-words-for-loras

Conversation

Copilot AI commented Feb 3, 2026

Copy link
Copy Markdown

Many LoRAs require specific trigger words for optimal results. Testing multiple LoRAs in XY Plot batch runs previously required either adding all trigger words to the base prompt (causing unwanted interactions) or running separate workflows.

Changes

Data Structure

  • Extended LoRA tuple from (name, model_str, clip_str) to (name, model_str, clip_str, trigger_word)
  • Maintained backward compatibility by handling both 3-tuple and 4-tuple formats in load_lora() and all unpacking operations

Node Updates

  • TSC_XYplot_LoRA_Batch: Added trigger_words multiline input (one per line, matches sorted LoRA order)
  • TSC_XYplot_LoRA: Added trigger_word_{i} inputs for manual mode, trigger_words for batch mode
  • TSC_XYplot_LoRA_Plot: Added trigger_word and X_trigger_words inputs
  • TSC_LoRA_Stacker: Added trigger_word_{i} inputs for each stack slot

Prompt Injection

  • Trigger words automatically appended to positive prompt during XY Plot iteration when LoRA is applied
  • Handles X/Y loop state correctly using existing prompt tuple structure (current, original, after_X)

Example

# XY Plot node configuration
X_trigger_words = """
anime style, masterpiece
photorealistic, 8k
oil painting
"""

# Base prompt: "a beautiful landscape"
# With lora1.safetensors → "a beautiful landscape anime style, masterpiece"
# With lora2.safetensors → "a beautiful landscape photorealistic, 8k"
# With lora3.safetensors → "a beautiful landscape oil painting"

Empty trigger words are valid - LoRAs without trigger words work as before.

Original prompt

This section details on the original issue you should resolve

<issue_title>Capability to add trigger words for respective LoRas in XY plot workflows?</issue_title>
<issue_description>Hi, I've been hoping to check the effects of multiple LoRas against different model/prompt combinations, so am trying the XY Plot nodes from this repo. It's neat, but some of the LoRas require trigger words for most effect and I was curious if there might be a way to add those when those specific models are applied in the batch run.

I guess that all of the trigger words could be added to the prompt up-front, not sure if that will cause any significant side-effects in overall prompt processing.

It's just a very basic workflow at this time:

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 7 commits February 3, 2026 23:04
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
…rmats

Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
Co-authored-by: jags111 <5968619+jags111@users.noreply.github.com>
Copilot AI changed the title [WIP] Add capability to include trigger words for LoRas in XY plot workflows Add trigger word support for LoRAs in XY Plot workflows Feb 3, 2026
Copilot AI requested a review from jags111 February 3, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capability to add trigger words for respective LoRas in XY plot workflows?

2 participants