choey / Comfy-Topaz

Topaz Photo AI integration for ComfyUI
MIT License
26 stars 4 forks source link

Access is denied error #4

Open ahosama opened 3 weeks ago

ahosama commented 3 weeks ago

Getting the following error upon execution of this node:

Error occurred when executing TopazPhotoAI:

[WinError 5] Access is denied

File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Graphics\ComfyUI_windows_portable\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 "C:\Graphics\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfy-Topaz\topaz.py", line 266, in upscale_image (upscaled_img_file, user_settings, autopilot_settings) = self.topaz_upscale(img_file, compression, format, tpai_exe=tpai_exe, upscale=upscale, sharpen=sharpen) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Graphics\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfy-Topaz\topaz.py", line 241, in topaz_upscale p_tpai = subprocess.run(tpai_args, capture_output=True, text=True, shell=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "subprocess.py", line 548, in run File "subprocess.py", line 1026, in init File "subprocess.py", line 1538, in _execute_child

choey commented 2 weeks ago

Hi--thanks for the report!

A few questions to help debug:

  1. What's the value of tpai_exe?
  2. What happens if you execute tpai.exe from the command line? (e.g., Win + R -> cmd -> paste value from tpai_exe)
ahosama commented 2 weeks ago

If I execute tpai.exe from cmd, I get this message: Checking if log directory should be pruned. Currently have 10 log files. Log file count is within bounds QObject::moveToThread: Cannot move objects with a parent Logger initialized Error | Attempted to set index out of range: 0 images loaded, but setting index to 0 No valid image files passed

choey commented 1 week ago

Looks like you do have access to execute tpai.exe, so the error message from the node is indeed puzzling.

Would you confirm the following please?

  1. The tpai_exe value within the comfy node points to the file (tpai.exe) and not the directory.
  2. The system user that's running comfy is the same user that ran tpai.exe from cmd (can check from Task Manager, under the details tab). Is comfy running on a remote server that doesn't have Topaz Photo AI installed? Is comfy running locally but as a different user with no access to tpai.exe?

If both of these are true, then I'd be at a loss and have to add some more logging to debug.

ahosama commented 4 days ago

Believe it or not, I did try to link the exe at first but got an error so I just input the directory only. Now when I include the /tpai.exe, everything seems to work just fine.