Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-CustomNodePacks > VAE Similarity Analyser (C2C)

ComfyUI Node: VAE Similarity Analyser (C2C)

Class Name

VAESimilarityAnalyserMEC

Category
C2C/ModelAnalysis
Author
Code2Collapse (Account age: 1184days)
Extension
ComfyUI-CustomNodePacks
Latest Updated
2026-07-29
Github Stars
0.05K

How to Install ComfyUI-CustomNodePacks

Install this extension via the ComfyUI Manager by searching for ComfyUI-CustomNodePacks
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-CustomNodePacks in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

VAE Similarity Analyser (C2C) Description

Node for detailed analysis of similarity between VAEs or models with state dictionaries, using cosine similarity on learned parameters.

VAE Similarity Analyser (C2C):

The VAESimilarityAnalyserMEC node is designed to provide a detailed analysis of the similarity between two Variational Autoencoders (VAEs) or any models that expose a state dictionary. This node calculates the cosine similarity on a tensor-by-tensor basis, offering insights into how closely related two models are in terms of their learned parameters. By focusing on the cosine similarity, it provides a robust measure of alignment between the models' weights, which can be particularly useful for diagnosing model performance, understanding model drift, or comparing different versions of a model. The node is purely diagnostic and does not alter the input models, ensuring that your original models remain unchanged. This makes it an invaluable tool for AI artists and developers who wish to understand the internal workings and similarities of their models without the risk of unintended modifications.

VAE Similarity Analyser (C2C) Input Parameters:

vae_a

This parameter represents the first VAE model that you want to compare. It is essential for the analysis as it serves as one of the two models whose state dictionaries will be evaluated for similarity. The parameter does not have a default value and must be provided for the node to function.

vae_b

This parameter is the second VAE model to be compared against the first. Like vae_a, it is crucial for the analysis, as the node will compute the cosine similarity between the state dictionaries of vae_a and vae_b. This parameter also does not have a default value and must be specified.

include_per_tensor

This optional boolean parameter determines whether the analysis should include detailed per-tensor cosine similarity entries in the JSON report. By default, this is set to False, meaning that the report will focus on per-block similarities unless specified otherwise. Setting this to True will provide a more verbose output, which can be useful for in-depth analysis but may also result in a more extensive report.

VAE Similarity Analyser (C2C) Output Parameters:

report_json

This output provides a comprehensive JSON report detailing the similarity analysis. It includes per-block cosine similarities, any missing keys, and optionally, per-tensor details if include_per_tensor was set to True. This report is valuable for understanding the specific areas of similarity and divergence between the two models.

global_cosine

This output is a float representing the global cosine similarity across all common tensors between the two models. It provides a single metric that summarizes the overall similarity, making it easy to quickly assess how closely the models align.

most_divergent_blocks

This output is a JSON list of the ten most divergent blocks, sorted by their cosine similarity in ascending order. This allows you to identify which parts of the models differ the most, which can be crucial for targeted model improvements or understanding specific areas of model drift.

VAE Similarity Analyser (C2C) Usage Tips:

  • To get a quick overview of model similarity, use the default settings without enabling include_per_tensor. This will provide a concise report focusing on block-level similarities.
  • If you need a detailed analysis, especially when diagnosing specific issues or understanding subtle differences, enable include_per_tensor to get a more granular view of the similarities.

VAE Similarity Analyser (C2C) Common Errors and Solutions:

VAE input is None.

  • Explanation: This error occurs when one or both of the VAE inputs (vae_a or vae_b) are not provided or are set to None.
  • Solution: Ensure that both vae_a and vae_b are correctly specified and are valid VAE models or state dictionaries before running the analysis.

Cannot extract state_dict from <type>

  • Explanation: This error indicates that the node was unable to extract a state dictionary from the provided model object, possibly because the object does not have a state_dict method or attribute.
  • Solution: Verify that the input models are compatible and have a state_dict method. If using custom models, ensure they are properly implemented to expose their state dictionaries.

VAE Similarity Analyser (C2C) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-CustomNodePacks
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

VAE Similarity Analyser (C2C)