Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: No user directories found #202

Closed
wilzamguerrero opened this issue Dec 30, 2024 · 28 comments
Closed

ValueError: No user directories found #202

wilzamguerrero opened this issue Dec 30, 2024 · 28 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@wilzamguerrero
Copy link

hi i have this problem when begin comfyui um running this in kagle i clone the rep of comfyui griptape and i installed the requirements and !pip install "griptape[all]" -U

Total VRAM 15095 MB, total RAM 32103 MB
pytorch version: 2.4.1+cu121
xformers version: 0.0.28.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 Tesla T4 : cudaMallocAsync

Traceback (most recent call last):
File "/kaggle/working/SDZC/nodes.py", line 2092, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/init.py", line 59, in
from .nodes.config.gtUILMStudioDriversConfig import gtUILMStudioDriversConfig
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/nodes/config/gtUILMStudioDriversConfig.py", line 17, in
from ..drivers.gtUILMStudioChatPromptDriver import gtUILMStudioChatPromptDriver
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/nodes/drivers/gtUILMStudioChatPromptDriver.py", line 4, in
from .gtUIOpenAiCompatibleChatPromptDriver import gtUIOpenAiCompatibleChatPromptDriver
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/nodes/drivers/gtUIOpenAiCompatibleChatPromptDriver.py", line 3, in
from .gtUIOpenAiChatPromptDriver import gtUIOpenAiChatPromptDriver
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/nodes/drivers/gtUIOpenAiChatPromptDriver.py", line 6, in
models = get_available_models("ChatModel")
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/nodes/utils/openai_utils.py", line 34, in get_available_models
settings = GriptapeSettings()
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/py/griptape_settings.py", line 25, in init
self.setup()
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/py/griptape_settings.py", line 124, in setup
self.get_settings_file()
File "/kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape/py/griptape_settings.py", line 41, in get_settings_file
raise ValueError("No user directories found")
ValueError: No user directories found

Cannot import /kaggle/working/SDZC/custom_nodes/ComfyUI-Griptape module for custom nodes: No user directories found

@shhlife
Copy link
Collaborator

shhlife commented Dec 30, 2024

This is using Kaggle? How are you setting it up to run? It seems to be having trouble when it's trying to find the user directory.. do you have instructions on how you got ComfyUI working with Kaggle? If you can send me those, I can try and re-create.

@shhlife shhlife self-assigned this Dec 30, 2024
@shhlife shhlife added bug Something isn't working enhancement New feature or request labels Dec 30, 2024
@wilzamguerrero
Copy link
Author

is weird i execute and i run comfyui the first time and i have this error, later i stop and later i run again and griptape work

@shhlife
Copy link
Collaborator

shhlife commented Dec 30, 2024

hmm.. are you able to reproduce the error?

@wilzamguerrero
Copy link
Author

well i install with this

!pip install "griptape[all]" -U
!git clone https://github.com/griptape-ai/ComfyUI-Griptape {sdzc_path}/custom_nodes/ComfyUI-Griptape
!pip install -r {sdzc_path}/custom_nodes/ComfyUI-Griptape/requirements.txt

@shhlife
Copy link
Collaborator

shhlife commented Jan 1, 2025

does Kagle not allow you to install via the comfyUI manager?

@wilzamguerrero
Copy link
Author

yes i can install with the manager but when i reboot again don't appear, and I have to delete the folder and install manually and work, many steps

@shhlife
Copy link
Collaborator

shhlife commented Jan 1, 2025

Okay - do you have an example of how to get ComfyUI working in Kagle without Griptape? I'd be happy to follow a tutorial to get it up and running and see if I can re-create the issue.

@wilzamguerrero
Copy link
Author

@shhlife
Copy link
Collaborator

shhlife commented Jan 2, 2025

hmm -that example didn't work for me at all - it couldn't install anything. Basically stuck in this loop:

image

I'll see if I can remove the need for the user directories

@wilzamguerrero
Copy link
Author

try with this

base_path = "/kaggle/working"
zzz_path = os.path.join(base_path, "zzz")

os.chdir(base_path)
!git clone --depth 1 https://github.com/comfyanonymous/ComfyUI.git zzz
os.chdir(zzz_path)

!pip uninstall torch torchvision torchaudio xformers -y
!pip install torch torchvision torchaudio xformers==0.0.28.post3 --extra-index-url https://download.pytorch.org/whl/cu121
!pip install -r requirements.txt
#!pip install --upgrade gguf
#!pip install bitsandbytes>=0.43.0
!mamba install openssh -y
!pip install PyOpenGL PyOpenGL_accelerate
!pip install groq
!pip install blend_modes
!pip install einops
!pip install pyngrok
!pip install fal_client
!pip install "griptape[all]" -U

from multiprocessing import Process

def run_app():
cmd = f"python {zzz_path}/main.py --dont-print-server & ssh -o StrictHostKeyChecking=no -p 80 -R0:localhost:8188 a.pinggy.io > log.txt"
get_ipython().system(cmd)

def print_url():
time.sleep(2)
found = False
end_word = '.pinggy.link'
with open('log.txt', 'r') as file:
for line in file:
start_index = line.find("http:")
if start_index != -1:
end_index = line.find(end_word, start_index)
if end_index != -1:
url = line[start_index:end_index + len(end_word)]
print(f"{url}")
found = True
if not found:
print_url()

p_app = Process(target=run_app)
p_url = Process(target=print_url)
p_app.start()
p_url.start()
p_app.join()
p_url.join()

!python main.py

@shhlife
Copy link
Collaborator

shhlife commented Jan 2, 2025

can you re-send that with indented code? you can wrap it in ``` :)

@shhlife
Copy link
Collaborator

shhlife commented Jan 2, 2025

I tried this:

update = False

import os

base_path = "/kaggle/working"
zzz_path = os.path.join(base_path, "zzz")

os.chdir(base_path)
!git clone --depth 1 https://github.com/comfyanonymous/ComfyUI.git zzz
os.chdir(zzz_path)

!pip uninstall torch torchvision torchaudio xformers -y
!pip install torch torchvision torchaudio xformers==0.0.28.post3 --extra-index-url https://download.pytorch.org/whl/cu121
!pip install -r requirements.txt
#!pip install --upgrade gguf
#!pip install bitsandbytes>=0.43.0
!mamba install openssh -y
!pip install PyOpenGL PyOpenGL_accelerate
!pip install groq
!pip install blend_modes
!pip install einops
!pip install pyngrok
!pip install fal_client
!pip install "griptape[all]" -U

from multiprocessing import Process

def run_app():
    cmd = f"python {zzz_path}/main.py --dont-print-server & ssh -o StrictHostKeyChecking=no -p 80 -R0:localhost:8188 a.pinggy.io > log.txt"
    get_ipython().system(cmd)

def print_url():
    time.sleep(2)
    found = False
    end_word = '.pinggy.link'
    with open('log.txt', 'r') as file:
        for line in file:
            start_index = line.find("http:")
            if start_index != -1:
                end_index = line.find(end_word, start_index)
            if end_index != -1:
                url = line[start_index:end_index + len(end_word)]
                print(f"{url}")
                found = True
    if not found:
        print_url()

p_app = Process(target=run_app)
p_url = Process(target=print_url)
p_app.start()
p_url.start()
p_app.join()
p_url.join()

!python main.py

but it seems to be failing here:

Cloning into 'zzz'...
fatal: unable to access 'https://github.com/comfyanonymous/ComfyUI.git/': Could not resolve host: github.com
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[5], line 10
      8 os.chdir(base_path)
      9 get_ipython().system('git clone --depth 1 https://github.com/comfyanonymous/ComfyUI.git zzz')
---> 10 os.chdir(zzz_path)
     12 get_ipython().system('pip uninstall torch torchvision torchaudio xformers -y')
     13 get_ipython().system('pip install torch torchvision torchaudio xformers==0.0.28.post3 --extra-index-url https://download.pytorch.org/whl/cu121')

FileNotFoundError: [Errno 2] No such file or directory: '/kaggle/working/zzz'

@shhlife
Copy link
Collaborator

shhlife commented Jan 2, 2025

I just pushed a new release that will try and create the user directory if it doesn't exist - maybe that will resolve it?

@wilzamguerrero
Copy link
Author

Is strange here clone well the repo inside zzz, only clone the content of comfyui

@shhlife
Copy link
Collaborator

shhlife commented Jan 3, 2025

yeah, I don't know why I can't get it to work - but can you give the latest update a try and see if it solves your other problem?

@wilzamguerrero
Copy link
Author

i try again in a clean space and i tell you thank you so much for this and i don't know if you can add some utilities to griptape for comfyui

@shhlife
Copy link
Collaborator

shhlife commented Jan 3, 2025

my pleasure - and always happy to add more to the nodes. what kind of utilities do you have in mind?

@wilzamguerrero
Copy link
Author

wilzamguerrero commented Jan 3, 2025

wait i made a preview to this, and i can write you in private for be more fast, discord, wts or something

@wilzamguerrero
Copy link
Author

wilzamguerrero commented Jan 3, 2025

For example something like this with many values for switch in one i guest the same idea like your nodes that add items in fly
image

@shhlife
Copy link
Collaborator

shhlife commented Jan 3, 2025

discord is easy - or just create a ticket so we can track it. :) So basically a switch node that will take multiple inputs and then allow you to choose a specific one as an output?

I think I could do that pretty easily.. but in your mockup, you've got "groups" of switch nodes, right? so a model & two prompts? Not sure if I could make something like that..

but the first one, yeah - that'd be easy enough to do

@shhlife
Copy link
Collaborator

shhlife commented Jan 3, 2025

Something like this?

image

@shhlife
Copy link
Collaborator

shhlife commented Jan 3, 2025

here it is with configuration nodes instead.. two switches so you can see the difference
image

@wilzamguerrero
Copy link
Author

discord is easy - or just create a ticket so we can track it. :) So basically a switch node that will take multiple inputs and then allow you to choose a specific one as an output?

I think I could do that pretty easily.. but in your mockup, you've got "groups" of switch nodes, right? so a model & two prompts? Not sure if I could make something like that..

but the first one, yeah - that'd be easy enough to do

yes the point is for group of values and can switch with this the example is model and conditions but is for whatever group of nodes with the same content of course

@shhlife
Copy link
Collaborator

shhlife commented Jan 3, 2025

ahh.. that's not super easy to do.. as far as I know we can't do dynamic output count. the outputs are defined in python. One thing I could do is a series of switch nodes.. one with one output, one with two, one with three, one with four.. then you would just choose which count you need.. and you just need to make sure you enter the right number of input groups..

that might work? a bit complicated to figure out, but not impossible

@wilzamguerrero
Copy link
Author

Well if you can do this it will be of great help because I didn't find anything like that.

@shhlife
Copy link
Collaborator

shhlife commented Jan 3, 2025

Okay, I've added it as a feature request: #218

:)

in the meantime, I did just publish the single-dimensional switch node in the latest update.

also, back to the topic of this issue - did the latest update fix the problem?

@wilzamguerrero
Copy link
Author

Thank you for all well I install again in a clean version and sometimes even if I install with the manager the first time have problem but I run again and works, maybe the problem is the register for the first time, but in general work fine so, thank you so much, the fix is only stop and run again and work

@shhlife
Copy link
Collaborator

shhlife commented Jan 8, 2025

okay, thank you! we'll keep trying to make it work the first time. :)

@shhlife shhlife closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants