alpertunga-bile / prompt-generator-comfyui

Custom AI prompt generator node for the ComfyUI
MIT License
85 stars 8 forks source link

[BUG] #3

Closed S0LTIS closed 1 year ago

S0LTIS commented 1 year ago

Cannot import C:\Users\Z0Z00FICIAL\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\prompt-generator-comfyui module for custom nodes: Command '.\python_embeded\python.exe -s -m pip install optimum[onnxruntime-gpu]' returned non-zero exit status 1.

Operating System Windows 11 Pro

Python Version Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32

S0LTIS commented 1 year ago

To append.

Cannot import C:\Users\Z0Z00FICIAL\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\prompt-generator-comfyui module for custom nodes: No module named 'transformers.models.gpt_bigcode'

alpertunga-bile commented 1 year ago

Hello, thanks for reporting. I reinstalled and tried with the new release of portable ComfyUI and it seems working. I am going to write the steps that I take below:

I tested it with Windows 11 and Python 3.10.6 prompt-generator-comfyui hash => f577714 ComfyUI portable release => which is released in the first week of October 2023

  1. Go to Release section of the ComfyUI
  2. Download the latest version of the ComfyUI_windows_portable_nvidia_cu118_or_cpu.7z file. direct link of the file
  3. Extract the zip file
  4. Get in the ComfyUI_windows_portable folder
  5. Check if ComfyUI is running without custom nodes with running run_nvidia_gpu.bat file (It is)
  6. Go to ComfyUI/custom_nodes folder
  7. Clone the repository with https://github.com/alpertunga-bile/prompt-generator-comfyui.git command
  8. Go back to ComfyUI_windows_portable folder
  9. Run the run_nvidia_gpu.bat file
  10. Open the basicWorkflowWithPromptGenerator.json workflow which is located in the ComfyUI/custom_nodes/promp-generator-comfyui folder
  11. Put the text prompt generator model under the ComfyUI/models/prompt_generators folder
  12. Refresh the ComfyUI and test if it is running

I am sorry that I can't reproduce the problem you encounter and provide a solution for that. You may want to check which folder you start the ComfyUI because the installation script that I wrote checks if python_embeded folder is present. You have to run it from the ComfyUI_windows_portable folder to work properly.

If you encounter any problems after following these steps let me know.

rauldlnx10 commented 1 year ago

To append.

Cannot import C:\Users\Z0Z00FICIAL\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\prompt-generator-comfyui module for custom nodes: No module named 'transformers.models.gpt_bigcode'

I solved it by doing a "pip uninstall transformers" and "pip install transformers"

alpertunga-bile commented 1 year ago

Hello, thank you (@rauldlnx10) for providing a solution for the problem. I assume that an issue is fixed in the new version of the transformers package.

As a note @rauldlnx10, you can use --upgrade option with pip to update a package. With this option you don't have to uninstall and install the package again. You can check this stackoverflow post. I am providing this solution because I think the problem is not about the package integrity but the package version.