KJNodes/experimentalgenerated

MOSS-Image Prompt Weight(MossImagePromptWeight)

MOSS-Image Prompt Weight provides per-token prompt weighting for MOSS-Image by scaling attention values, using the same approach as Krea2 Prompt Weight.

Moss Image Prompt Weight

clip
model
model
conditioning
text
STRING
strength
1.00
KJNodes

Description

MOSS-Image Prompt Weight provides per-token prompt weighting for MOSS-Image by scaling attention values, using the same approach as Krea2 Prompt Weight. It is intended for MOSS-Image workflows where ComfyUI’s ordinary (word:weight) weighting does nothing because the Qwen3.5 text encoder ignores it. With this node you can remove or repress concepts using negative weights and emphasize concepts using larger positive weights.

The node outputs a patched model and conditioning. Wire both outputs to the sampler. On a ComfyUI that accepts attention-bias conditioning, positive emphasis is carried by the conditioning, and the model is only patched for weights below 1. Category: KJNodes/experimental.

Inputs

clip

CLIP required. The CLIP/text encoder used to process the prompt. For MOSS-Image this is the Qwen3.5 encoder where normal ComfyUI weighting is ignored.

model

MODEL required. The MOSS-Image model to patch for prompt weighting. Connect the same model you intend to sample with, and wire the node’s MODEL output to the sampler.

text

STRING required, default "".

Prompt with per-token weights written in parentheses:

  • (word:-1) removes or represses a concept.
  • (word:2) emphasizes it.
  • Plain text is treated as weight 1.0.
  • (word:1.5) is a typical emphasis example.

Weight semantics:

  • weight < 1 scales the token’s attention VALUE; at < 0 it subtracts/removes the concept.
  • weight > 1 boosts how much the image ATTENDS to the token, adding more of it.

Bracket syntax blends one prompt per option, for example [cat|fox]. The optional number is that option’s attention bias, for example [cat|fox:-1].

Only positive conditioning is weighted. Negative prompts pass through untouched.

strength

FLOAT required, default 1, minimum 0, maximum 4, step 0.05.

Global multiplier on the weighting effect. The effect compounds over all 42 blocks. Lower this value if results break up; raise it for a stronger effect. Removal (weight < 0) is the reliable direction; emphasis (weight > 1) works but is looser.

Outputs

MODEL output

The patched model for prompt weighting. Wire this output to the sampler. On ComfyUI versions that accept attention-bias conditioning, the model is only patched for weights below 1 while emphasis rides on the conditioning.

CONDITIONING

The weighted conditioning. Wire this output to the sampler together with the MODEL output. On ComfyUI that accepts attention-bias conditioning, positive emphasis is applied through this conditioning.

Usage Notes

  • Use this node when normal ComfyUI (word:weight) syntax has no effect on MOSS-Image because the Qwen3.5 encoder ignores it.
  • Use (word:-1) to remove/repress a concept and (word:1.5) or (word:2) to emphasize one.
  • Plain text has weight 1.0.
  • Only positive conditioning is weighted; negative prompts are passed through untouched.
  • [cat|fox] blends one prompt per option. Add an attention-bias number such as [cat|fox:-1] when needed.
  • The strength control multiplies the entire weighting effect across all 42 blocks. Lower it if the image breaks up, and raise it for a stronger effect.
  • Removal with negative weights is the reliable direction; positive emphasis is looser.
  • Wire both the MODEL and CONDITIONING outputs to the sampler.

Comments

Sign in with GitHub to join the discussion.

Loading comments…