Here is an example of how manual install of ComfyUI into a virtual environment may come in handy in some circumstances.
I decided to try a WAN2.2 i2v workflow allowing to make clips longer than 5 seconds. In fact they claim that it allows clips up to 20 seconds long to me made. There are some nuances to this, but still.
Anyways, the workflow needed 4 new modules installed. The first three installed with no problems, but a package in the last one created a version conflict.
The package was ‘colour-science,’ and since no version was specified in the module’s requirements.txt file, the system went and installed the latest version of it – v-0.4.7. However, this version of ‘colour-science’ requires numpy version <3 but >=2.0.0. So, the installer did not think twice, uninstalled numpy v.1.26.4 that was installed, and replaced it with the latest version 2.4.2.
One would think, the newer version, the better. But this is not how things work in Python. Because there was a reason for which I kept numpy v.1.26.4, even though its newer versions were available. And this reason is that several other packages require numpy version older than v.2.4.x. In particular:
cupy-cuda12x 12.3.0 requires numpy<1.29,>=1.20, but you have numpy 2.4.2 which is incompatible.
mediapipe 0.10.21 requires numpy<2, but you have numpy 2.4.2 which is incompatible.
numba 0.62.1 requires numpy<2.4,>=1.22, but you have numpy 2.4.2 which is incompatible.
But, as was already mentioned, package ‘colour-science; requires numpy version greater than or equal v.2.0.0, which it informed me of when I uninstalled numpy v.2.4.2 and put back v.1.26.4:
‘colour-science 0.4.7’ requires numpy<3,>=2.0.0, but you have numpy 1.26.4 which is incompatible.
So, looks like a stalemate, because some installed Python packages require the version of numpy that conflicts with the version of numpy required by the package I am attempting to install. And this package is required by the custom module required by the workflow I am trying to use. What to do?
The solution is rather trivial. In the requirements.txt file for the module being installed, no specific version of ‘colour-science’ package is specified. So, perhaps, it could be possible to install an older version of it instead of the newest v.0.4.7 that is automatically installed when the installation if done without specifying the package version?
A brief consultation with ChatGPT confirms that this is indeed a viable solution and that package ‘colour-science’ v.0.4.6 or v.0.4.5 may be happy with numpy v.1.26.4. And, indeed, installing package ‘colour-science’ with indicating a specific version number, i.e.:
pip install colour-science==0.4.6
instead of simply
pip install colour-sciecnce
did not return any message about package version conflicts. Running, for good measure, command ‘pip check’ returned message that no conflicts existed:
(G:\ComfyUI\venv) G:\ComfyUI>pip check
No broken requirements found.
Had this module been installed using ComfyUI Manager, I am not sure, if I would have been able to solve this problem so easily. Although, I cannot say for sure, because I have been only using Manager to check for installed and missing modules and, perhaps, it does provide a means for resolving such package version conflicts.
And, oh, I did get the workflow working. Here are two first 5-second video clips made with it. The first clip is without upscaling, the second one is upscaled. Click the image to play the clip.
The clip without upscaling took about 7 minutes to generate, the one with upscaling took about 11 minutes. I think it’s pretty decent time for my rig. What do you think?
And here are two 26-second long samples. The first one was generated from the workflow image and prompt and the other one from my own image and prompt.
To view these clips you need to register (free) and log in.
Both clips have the workflow embedded in them.