Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ComfyUI on gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 215
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Sun Aug 04, 2024 6:14 pm    Post subject: ComfyUI on gentoo Reply with quote

Hi community :D

With all the fuzz going around it, I'd like to experiment more with image generation and switch over to ComfyUI. Up to now I use Easy Diffusion because this provided me a single file to install it and hopefully didn't it mess up anything.

In the past (it is so long ago that it was 32bit on my desktop) I had carelessly used pip as a user and then I had the impression that there was something messed up with python even after I tried to remove everything pip did before I unmerged pip - even though I used pip only as a regular user. This left some bad feelings in my guts in regard of pip... And now I don't want to mess up something on my current installation :wink:

So, is there anybody out there who has succeeded installing ComfyUI and/or who is pretty sure on how to do it without having a mess when it comes the time to remove ComfyUI again?
Or might there be an ebuild for ComfyUI I just didn't find?

Best,
Andy
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
icaruslnx
n00b
n00b


Joined: 14 Apr 2009
Posts: 19

PostPosted: Mon Aug 05, 2024 4:52 pm    Post subject: Reply with quote

I have been toying with this recently, my system needs much better hardware but I got it functionally working eventually using the docker which has options to build with Automatic or ComfyUI along with images for CPU only or specific GPUs

Following a lot of the guides gets a bit dangerous as they wish for specific versions of python and mostly use pip, I needed to find the corresponding ebuilds to avoid running pip which was time consuming.

https://github.com/AbdBarho/stable-diffusion-webui-docker/wiki/Setup#detailed-steps

Getting CUDA working on my system was much more demanding, eventually installing app-containers/nvidia-container-toolkit got all that working properly for me, I think current Gentoo documentation is lacking on GPU implementation or I was just not able to find the right docs that worked with my setup.
Just realized there's a llvm profile which probably would have made it a lot easier on me instead of building off the gnome/systemd one, live and learn!
Back to top
View user's profile Send private message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 215
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Tue Aug 06, 2024 11:01 am    Post subject: Reply with quote

Hi icaruslnx,

icaruslnx wrote:
[...] I needed to find the corresponding ebuilds to avoid running pip which was time consuming.

So you needed to search and then emerge ebuilds for the dependencies written out in https://github.com/comfyanonymous/ComfyUI/blob/master/requirements.txt in order to use the ComfyUI-docker-thingy?
Code:
torch
torchsde
torchvision
torchaudio
einops
transformers>=4.28.1
tokenizers>=0.13.3
sentencepiece
safetensors>=0.4.2
aiohttp
pyyaml
Pillow
scipy
tqdm
psutil

#non essential dependencies:
kornia>=0.7.1
spandrel
soundfile


Did you find all of them? Or was that before you found out that these were not needed when using docker?

I can't say I trust the docker thing either. That's one more thing that aims to control software on my computer...

What would it look like if this was all written into an ebuild? Would pip still need to be run?
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
icaruslnx
n00b
n00b


Joined: 14 Apr 2009
Posts: 19

PostPosted: Tue Aug 06, 2024 9:07 pm    Post subject: Reply with quote

I'm not sure if I was able to find all the corresponding packages, I eventually gave up and stuck with the docker due to so many of the packages requiring specific versions, I even fell back to python 3.11 to try and satisfy them all.

I'm sure if I was determined to statically set all the library versions and take the time to confirm everything I might be able to get it using portage only but this is just a hobby for me so I don't have motivation for that. In the end it felt like way too much work that has potential to make my system unstable over time.

I don't like using containers for the same reason but it works and the only system item you need to worry about is making sure your GPU has CUDA enabled. On the plus side I forced myself to learn about docker which I've been avoiding for years!

It's something I'll be keeping an eye on and hopefully one day we can have an ebuild that works, I feel there are just too many moving pieces at the moment where if one updates, it breaks the whole thing. I'm going to be patient and hope the environment settles down soon and not be so picky about the versions.
If anyone has suggestions other than containers I'd be willing to give it a try
Back to top
View user's profile Send private message
Lebkoungcity
Apprentice
Apprentice


Joined: 16 Nov 2008
Posts: 215
Location: near Lebkoungcity (='Gingerbreadcity' =Nuremberg)

PostPosted: Thu Aug 08, 2024 2:43 pm    Post subject: Reply with quote

Yeah, I feel what you mean. I just spent an hour or two trying to understand what an ebuild for ComfyUI could look like. The first part with the dependencies and stuff is more or less understandable. But when it comes to building it... my understanding of this stuff is just not good enough.

So, I'll see if I want to befriend with docker or not.
Anyway, thanks a lot for your time!
_________________
"The most dangerous world view is the world view of the ones who haven't viewed the world."
Alexander von Humboldt (1769-1859)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum