dev: The pain of moving from wsn to ws fixing ComfyUI Desktop, asdf

Sam showed me years ago a great way to organize your local machine. Basically you create workspace directory ws and then you put git, data, cache and everything else you need to build for that project.

For a long time ws was my home GitHub project I keep at richtong but lately we’ve been so focused on work that I want to switch it so the main work repo is ws and my personal user one is at wsu

Not surprisingly many things immediately broke, so if this happens to you here are the things to know. If you don’t want it to break completely you can do a mv wsn ws && ln -s ws wsn so the links don’t break, but I decided just to move it so I could find these. bugs:

  1. Finding WS_DIR. This is the variable that keeps track of where the workspace is. I use asdf and direnv, so I just wrote a small .envrc two liner which looks for git because the standard is ~/ws/git/src is where the main mono repo goes. And if it doesn’t find git in the path then look down for it, so most of my utilities in ./bin and ./lib are portable. They just rely on WS_DIR to tell them where they are.
  2. asdf direnv shims. Ok, one problem immediately is the asdf shims in venv are stored in bash scripts and the location of the python is hard coded in the #! as absolute paths. I sort of get why they did this, but you have to manually edit all the venv shims
  3. Comfy UI data directories. This is also a little painful, but I symlinked my ~/ComfyUI to the wsn locations and I can’t figure out where this so in the mean time I have to symlink it. Sigh, but basically compared with a standard Comfy installation where the config files are with the data files in ~/Documents/ComfyUI the Mac app separates these to ~/Library/Applications Support/ComfyUI. but I don’t see the configuration files here. although config.json exists but doesn’t have any of these old links. Sigh, so I finally had to just move the Library ComfyUI to ComfyUI and then Run Comfy for a clean installation and now it all works again. A big painful. Remember. you want your workflows backup and it is nice the output files do not get lost in doing this. I put all my workflows into a GitHub repo which is very nice as they aren’t big but this still didn’t work, so it means the configration stuff is somewhere else. So I just did a ls -lR ~/ComfyUI and found a bunch of links in custom_nodes and then another one in ~/ComfyUI/user/default which was the problem as it points to a non existent directory.
  4. Special configuration files. I’ve deprecated this and am now using Chezmoi, but on my older machine, I had a. bunch of pointers that were symlinked to a no longer existing wsn

Leave a Reply

Only people in my network can comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect

Recent posts

Loading Mastodon feed…