pythongosssss / ComfyUI-WD14-Tagger

A ComfyUI extension allowing for the interrogation of booru tags from images.
MIT License
432 stars 51 forks source link

[ONNXRuntimeError] ComfyUI-WD14-Tagger #60

Open Vigilence opened 2 weeks ago

Vigilence commented 2 weeks ago

I was able to use ComfyUI-WD14-Tagger fine yesterday with the v3 models but today they give this error. Everything, including comfyui and the nodes are up to date.

Screenshot 2024-06-13 161929 Screenshot 2024-06-13 161937

Error occurred when executing WD14Tagger|pysssss:

[ONNXRuntimeError] : 1 : FAIL : Load model from I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger\models\wd-vit-tagger-v3.onnx failed:D:\a\_work\1\s\onnxruntime\core/graph/model_load_utils.h:56 onnxruntime::model_load_utils::ValidateOpsetForDomain ONNX Runtime only *guarantees* support for models stamped with official released onnx opset versions. Opset 4 is under development and support for this is limited. The operator schemas and or other functionality may change before next ONNX release and in this case ONNX Runtime will not guarantee backward compatibility. Current official support for domain ai.onnx.ml is till opset 3.

  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\execution.py", line 81, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger\wd14tagger.py", line 200, in tag
    tags.append(wait_for_async(lambda: tag(image, model, threshold, character_threshold, exclude_tags, replace_underscore, trailing_comma)))
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger\pysssss.py", line 214, in wait_for_async
    loop.run_until_complete(run_async())
  File "asyncio\base_events.py", line 649, in run_until_complete
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger\pysssss.py", line 204, in run_async
    r = await async_fn()
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\custom_nodes\ComfyUI-WD14-Tagger\wd14tagger.py", line 58, in tag
    model = InferenceSession(name, providers=defaults["ortProviders"])
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "I:\StabilityMatrix-win-x64\Data\Packages\ComfyUI\venv\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 424, in _create_inference_session
    sess = C.InferenceSession(session_options, self._model_path, True, self._read_config_from_model)
alenknight commented 2 weeks ago

same issue here. came from https://github.com/comfyanonymous/ComfyUI/issues/3716#issuecomment-2169449139 - but yeah I'm getting the same error.

DarkAlchy commented 2 weeks ago

I just used this until midnight my time then BOOM: onnxruntime::model_load_utils::ValidateOpsetForDomain ONNX Runtime only guarantees support for models stamped with official released onnx opset versions. Opset 4 is under development and support for this is limited. The operator schemas and or other functionality may change before next ONNX release and in this case ONNX Runtime will not guarantee backward compatibility. Current official support for domain ai.onnx.ml is till opset 3.