Live data from Hacker News

Fooocus: OSS for image generation by ControlNet author

github.com

31–40 of 59 posts

Re: Fooocus: OSS for image generation by ControlNet author

#31

Are there ways to run such apps with a remote GPU over network? I want to run the UI on my laptop, but use my homeserver GPU from the local network. Anything better than X forwarding?

This project returns results over HTTP. You get what you want by running the server binary on the server, then access it with your web browser.

To flesh out this response with a common way to do this, the free tier of ngrok will likely help someone accomplish this, by running it on the server to get a routable endpoint to your ssh port (wouldn't hurt to further lock it down with any firewalling, if that's available ngrok-side.. haven't used ngrok in a while).

For example, to run the Stable Diffusion webui (which defaults to port 7860), it would be something not too far off from:

$ ssh -p1234 -L7860:127.0.0.1:7860 assigned.dns.at.startup.ngrok.io

(IIRC ngrok free-tier will allocate you a random port on the public side every time you start the service)

Then, can just browse localhost:7860 from the remote field machine.

I got bit by the AI bug a few days ago, and I already rent some lightsail instances, one of which has a static IP reserved and one of my domain names pointing to it. So, I set up something a little more convoluted and perhaps unnecessarily complex, turning that lightsail VM into a jumpbox/bastion host. Anywho:

AutoSSH from server to my lightsail instance, with two remote port forwards (not local port forwards): SSH and SD webui. Then, connect from the field machine anywhere in the world to the jumpbox with matching local port forwards. (I set up both ports, so I can shell back into the original machine, but this isn't strictly required.)

Then, fire up localhost:7860 in the web browser. Make sure this isn't being served on 0.0.0.0 or un-firewalled.

(e: I re-read original question after posting and realized GP was merely asking for over the LAN, but hey, now they know how to do this over the 'net :)

Re: Fooocus: OSS for image generation by ControlNet author

#32
For those who don't know, ControlNet is often used in conjunction with Stable Diffusion. It lets you add extra conditions to guide what is being generated. There are extensions for Automatic1111's stable diffusion webui that can make use of ControlNet. Some examples I've seen are copying the pose of a person/animal in an image and outputting a different person with the same pose (and extending to videos). Also taking line art drawings and filling it in with style.

https://stable-diffusion-art.com/controlnet/

Re: Fooocus: OSS for image generation by ControlNet author

#33

Earlier quoted context omitted.

This project returns results over HTTP. You get what you want by running the server binary on the server, then access it with your web browser.

Ooh, perfect. Now just have to wait for a Linux/docker release.

It was easy for me to set up on Ubuntu with CUDA 11.7. I cloned the repo, created a new python venv, and installed the requirements in requirements_versions.txt, but looking at launch.py, that wasn't even necessary. Just create a new venv for the project, activate it, and run `python launch.py`.

Re: Fooocus: OSS for image generation by ControlNet author

#35

Earlier quoted context omitted.

This project returns results over HTTP. You get what you want by running the server binary on the server, then access it with your web browser.

To flesh out this response with a common way to do this, the free tier of ngrok will likely help someone accomplish this, by running it on the server to get a routable endpoint to your ssh port (wouldn't hurt to further lock it down with any firewalling, if that's available ngrok-side.. haven't used ngrok in a while). For example, to run the Stable Diffusion webui (which defaults to port 7860), it would be something…

Even easier is to use Tailscale. Run tailscale on your laptop and server, and then access the web UI by using :

Re: Fooocus: OSS for image generation by ControlNet author

#36

Interesting, and I look forward to using it, but I wish the distribution had kept the folder-name conventions of AUTOMATIC1111, so that we could more easily have used symbolic links for folders of LoRAs and checkpoints etc. that we'd rather not duplicate.

Can't you symlink individual files? More effort but only a quick bit of scripting away.

(I've occasionally used a duplicate file eliminator that finds dups over a certain size and replaces them with symlinks. You can run it on an entire subtree or drive)

Re: Fooocus: OSS for image generation by ControlNet author

#38
post #12
post #5

The names given to the commits are... peculiar.

Tbh I’m (loosely) following commit message best practices in all of my projects out of irrational fear of being viewed as unprofessional. But never needed that effing prose in my workflow. Maybe a keyword from time to time. I’m using code, not messages to navigate history, and in a rare occasion. If all my messages turned into “i” I’d lose nothing, because all rationales and essentials are in code comments. I’d bette…

(Just an anecdote about my personal projects)

I often switch between different ideas/features/projects in the same repo, and I like rebasing between different chains of thought. For me, the messages are more like a memorable phrase. I also prepend them with a keyword for the overall project so I don't need a long dev branch, which has surprisingly been useful once or twice.

Otherwise, not really useful for me. I mostly just `git add -u && git commit --amend --no-edit`.

Re: Fooocus: OSS for image generation by ControlNet author

#39

Interesting, and I look forward to using it, but I wish the distribution had kept the folder-name conventions of AUTOMATIC1111, so that we could more easily have used symbolic links for folders of LoRAs and checkpoints etc. that we'd rather not duplicate.

Apparently it uses the folder structure of ComfyUI - I just symlinked the models folder from that and it worked with no issues. (I also reused my ComfyUI venv, just had to do a pip install pygit2 to make it work)

Re: Fooocus: OSS for image generation by ControlNet author

#40
post #12
post #5

The names given to the commits are... peculiar.

Tbh I’m (loosely) following commit message best practices in all of my projects out of irrational fear of being viewed as unprofessional. But never needed that effing prose in my workflow. Maybe a keyword from time to time. I’m using code, not messages to navigate history, and in a rare occasion. If all my messages turned into “i” I’d lose nothing, because all rationales and essentials are in code comments. I’d bette…

The commit contents can tell you what changed, but it can never tell you why it was changed, what the authors thoughts were, what corner cases they took into account, whether it was a temporary workaround for something that's no longer a problem...

(unless of course the author is a stickler for inline comments, which I also approve of)

Post reply on HN