Nodes/Concept Steer/Feature Dictionary
ComfyUI Node

Feature Dictionary

Run ~220 diverse prompts through the text encoder + SAE to discover what each feature responds to. Saves a JSON dictionary mapping feature indices to top-activating prompts. Run once per SAE, takes ~1–2 minutes.

By Nynxz·Created 5 months ago·Updated 5 months ago· 4
Feature Dictionary
    • dict_path
    • summary
    sae_path
    save_path/tmp/ComfyUI/custom_nodes/ComfyUI-ConceptSteer/sae/feature_dict.json
    layer22
    sae_expansion8
    top_prompts5
    n_extra_prompts300
    encoder_path
    protect_existingtrue
    CategoryConcept Steer/Features

    Inputs (8)

    NameTypeDefaultDescription
    sae_pathSTRINGPath to the trained SAE weights (.pt)
    save_pathSTRING/tmp/ComfyUI/custom_nodes/ComfyUI-ConceptSteer/sae/feature_dict.jsonWhere to save the feature dictionary JSON. Pass this path to Feature Map's dict_path input.
    layerINT221–36Transformer layer (must match SAE training)
    sae_expansionINT82–16SAE expansion factor (must match SAE training)
    top_promptsINT51–20How many top-activating prompts to store per feature
    n_extra_promptsINT3000–1000Extra generated prompts beyond the built-in ~120. More = better coverage and more discriminative labels. Uses diverse templates to avoid formulaic patterns.
    encoder_pathSTRINGPath to Qwen encoder safetensors (or set env var)
    protect_existingBOOLEANtrueIf the save path already exists, auto-rename to _v2, _v3, … instead of overwriting. Disable only when intentionally replacing.

    Outputs (2)

    NameTypeDescription
    dict_pathSTRING
    summarySTRING