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

CLIP Module?? #4

Open
JHNewton opened this issue Oct 5, 2023 · 12 comments
Open

CLIP Module?? #4

JHNewton opened this issue Oct 5, 2023 · 12 comments

Comments

@JHNewton
Copy link

JHNewton commented Oct 5, 2023

OK, I used manager in Comfyui to install your package. I'm getting an error saying that ther is no CLIP module. I ran pip to install the requirements.txt file. Here is the results:

PS D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\Endless-Nodes> D:\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install -r requirements.txt
Collecting clip (from -r requirements.txt (line 1))
Using cached clip-0.2.0.tar.gz (5.5 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "C:\Users\John\AppData\Local\Temp\pip-install-t97mvhaf\clip_583d4ae394354b519e59d31aa84bd99a\setup.py", line 4, in
import clip
ModuleNotFoundError: No module named 'clip'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
PS D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\Endless-Nodes>

Not sure what the problems is as I'm not a python programmer. In fact, I haven't done any sort of programming in close to 20 years so any assistance would be greatly appreciated.

@tusharbhutt
Copy link
Owner

tusharbhutt commented Oct 6, 2023

I had that issue too when trying to install CLIP for other nodes, so I went to the source. They have these install instructions:

https://github.com/openai/CLIP#usage

If you are on a Windows machine (and it seems that you are), navigate to the folder with ComfyUI in it, right-click and open a command prompt. Then type:

pip install ftfy regex tqdm
pip install git+https://github.com/openai/CLIP.git

Let me know if that worked for you. I seem to remember I had to jump through a lot of hoops to get it installed.

NOTE: You must have GIT installed on your machine to have this work

@JHNewton
Copy link
Author

JHNewton commented Oct 6, 2023 via email

@tusharbhutt
Copy link
Owner

tusharbhutt commented Oct 7, 2023

Yes... it should. But are you actually using

G:\output[\time(%Y-%m-%d)].

Or:

G:\output\%Y-%m-%d

?

The former is specific to the WAS nodes, I think.

@JHNewton
Copy link
Author

JHNewton commented Oct 7, 2023 via email

@tusharbhutt
Copy link
Owner

My code does save the image and json to two separate folders on different drives, but for the custom date codes, you have to use the python standard as noted in the readme (duplicated here for you: https://docs.python.org/2/library/time.html#time.sleep)

When using the Python standard were you still not able to save to a different drive/folder? I ask because I'm literally doing that right now as I type this.

@JHNewton
Copy link
Author

JHNewton commented Oct 7, 2023 via email

@JHNewton
Copy link
Author

JHNewton commented Oct 7, 2023 via email

@tusharbhutt
Copy link
Owner

Here is what I'm seeing my the console:
WAS Node Suite: Image file saved to: D:\ComfyUI_windows_portable\ComfyUI\output\2023-10-07\JHN_2023-10-07_0038.png

  • Unable to save file: {'[time(%Y-%m-%d)]\JHN_[time(%Y-%m-%d)]0001.png'}
    [Errno 2] No such file or directory: '[time(%Y-%m-%d)]\JHN
    [time(%Y-%m-%d)]_0001.png'

And here is the setup: [image: image.png]

There is no image file attached... and again, my node does not use [time(%Y-%m-%d)] as part of the name, it's just %Y-%m-%d, no square brackets, no "time".

@JHNewton
Copy link
Author

JHNewton commented Oct 8, 2023 via email

@tusharbhutt
Copy link
Owner

Does your date and time input look like the top line in the image below?

imagesaverone

@JHNewton
Copy link
Author

JHNewton commented Oct 23, 2023 via email

@tusharbhutt
Copy link
Owner

I've been using the example from the WAS save image node. Very similar but with square brackets and "time". JHN_[time(%y-%m-%d)] While it has been a very long time since I've done any programming, and none whatsoever in python, I can still gleam a piece or two of information from poking around in code. I noticed that WAS is calling a different time module than you are.

That would explain it, the WAS format is not a "standard" any more than my example file name :)

However, the "%h", "%M", etc that I have put in are indeed Python standard flags. So, glad we figured that out, please close the ticket if that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants