MiniMax H3 Metrics JSON:
H3MetricsJSON turns diagnostic information collected by an H3 flow-regeneration workflow into JSON, a structured text format that you can save, inspect, or process with other tools. It enables automatic saving for the supplied metrics object and produces a JSON representation of its current contents, helping you keep diagnostic records alongside your generated artwork. The node reuses an existing autosave destination when one is already configured; otherwise, it creates a numbered JSON filename using ComfyUI’s output-folder naming system. It also displays a message indicating the save destination. This is a reporting node rather than an image-processing or metrics-collection tool: it helps preserve and review information gathered elsewhere in your workflow, without itself enabling model instrumentation or changing generation settings.
MiniMax H3 Metrics JSON Input Parameters:
metrics
Required input of type H3_FLOW_METRICS. This is the metrics object containing the diagnostic information you want to export, rather than a JSON string or a file path. For example, you can obtain a compatible metrics object from H3RuntimeMetricsProbe, which installs passive instrumentation on a model and returns the associated metrics object. H3MetricsJSON checks this object for an existing autosave destination, enables autosaving at the selected destination, and converts its current contents into JSON text. The information available in the result depends on what other parts of your workflow have recorded and when this node executes; connecting a metrics object does not itself guarantee that sampling activity has already been recorded. There is no default value, numerical minimum or maximum, or selectable option list: you must connect a compatible metrics object.
filename_prefix
Optional input of type STRING, with a default value of h3_flow_regenerate/metrics. This controls the folder-and-filename prefix used to choose a JSON destination when the metrics object does not already have an autosave path. With the default setting, the node requests a location under ComfyUI’s output directory and creates a filename following the pattern metrics_00001_.json, where the five-digit counter is determined by ComfyUI’s naming helper. You can use a prefix such as h3_diagnostics/portrait_test to organize diagnostic files by project or experiment. The node adds the counter and .json extension, so you normally supply only the prefix. If the metrics object already has an autosave destination, that destination takes precedence and this parameter does not relocate the file. No numerical limits, fixed choices, or explicit string-length restrictions are defined in the node interface; valid path naming still depends on ComfyUI and your operating system.
MiniMax H3 Metrics JSON Output Parameters:
string
Output of type STRING, containing the JSON text returned by the metrics object when this node executes. This is the serialized diagnostic content, not the filename or save location. You can connect it to a compatible text-display or text-processing node to inspect or further process the recorded information. Its contents depend on the supplied metrics object and the events recorded by your workflow; the provided node code does not define a fixed list of JSON fields. Treat the returned string as a representation of the metrics at the time of execution, rather than a live view that automatically changes afterward. Separately, the node displays a UI message beginning with Saving metrics JSON: followed by the destination path, shown relative to ComfyUI’s output directory when possible.
MiniMax H3 Metrics JSON Usage Tips:
- Connect a genuine
H3_FLOW_METRICSoutput, such as themetricsoutput from H3RuntimeMetricsProbe. Do not substitute JSON text, a model connection, or a filename. - When using H3RuntimeMetricsProbe, route its patched
modeloutput into the generation workflow you want to observe. Exporting the metrics object alone does not cause the model to run or collect sampling activity. - If you need exact/forecast provenance with Spectrum, follow the probe’s documented placement guidance and put H3RuntimeMetricsProbe after Spectrum before exporting its metrics.
- Use descriptive prefixes such as
h3_diagnostics/lighting_comparisonto organize files. Leave off the.jsonextension because the node adds it along with a numbered suffix. - Check the displayed save destination before looking for the file. An existing autosave path overrides
filename_prefix, so changing the prefix may not change where a reused metrics object saves its data. - Distinguish the returned JSON text from the autosaved record. The returned text reflects the moment this node runs; if you need a final diagnostic report, ensure the relevant generation activity has finished before relying on that text as the complete record.
- Keep diagnostic files with the corresponding images and workflow settings when comparing experiments. This makes it easier to associate each record with the generation it describes without assuming that this node automatically embeds every generation setting.
MiniMax H3 Metrics JSON Common Errors and Solutions:
Missing required input: metrics
- Explanation: The node requires a compatible metrics connection and has no default object. ComfyUI may report a required-input validation error before execution; the exact wording depends on your version.
- Solution: Connect a
H3_FLOW_METRICSoutput from a compatible H3 node, then run the workflow again.
Input type mismatch for metrics
- Explanation: A text string, model, image, or other connection type cannot replace the required
H3_FLOW_METRICSobject. ComfyUI will normally reject an incompatible connection during validation. - Solution: Use the metrics output from a compatible node, such as H3RuntimeMetricsProbe, rather than a text node containing previously exported JSON.
AttributeError: '...' object has no attribute 'autosave_path'
- Explanation: This possible Python error indicates that the supplied object does not provide the metrics interface expected by H3MetricsJSON. Similar errors naming
enable_autosaveorto_jsoncan indicate an incompatible object or mismatched extension versions. - Solution: Reconnect a supported metrics output. If the connection is already correct, update the related extension components together and restart ComfyUI so the producer and exporter use compatible code.
PermissionError: [Errno 13] Permission denied
- Explanation: This possible filesystem error means that the process cannot access or write to the selected destination. The destination may come from an existing autosave path rather than the visible filename prefix.
- Solution: Check the selected destination and grant ComfyUI write access to its folder. If no autosave path is already configured, choose a prefix within a writable ComfyUI output location.
OSError: [Errno 28] No space left on device
- Explanation: This possible filesystem error means that the drive receiving the JSON file has insufficient free space.
- Solution: Free space on the destination drive and rerun the workflow. Check the actual autosave destination if changing the prefix appears to have no effect.
OSError: Invalid argument or File name too long
- Explanation: These possible operating-system errors can occur when a filename prefix or selected destination contains unsupported characters or exceeds filesystem path-length limits.
- Solution: Try a short, simple prefix such as
h3_diagnostics/testand avoid operating-system-reserved filename characters. Also check any autosave destination already configured on the metrics object.
The file is saved somewhere other than filename_prefix
- Explanation: This is expected behavior when the metrics object already has an autosave destination. The node deliberately reuses that destination instead of generating a new one.
- Solution: Read the
Saving metrics JSON:message to locate the file. To use a new prefix, supply a metrics object without an existing autosave destination or adjust that destination through the component that configured it.
The JSON is empty or does not include the expected generation activity
- Explanation: This is not necessarily an export failure. The metrics object may not have recorded the expected activity, or the node may have produced its returned string before that activity occurred.
- Solution: Confirm that the metrics-producing node instruments the model actually used for generation and that the same metrics object reaches H3MetricsJSON. Check execution timing, and inspect the autosaved file after generation rather than assuming the returned string updates continuously.
