Fooocus: OSS for image generation by ControlNet author
github.com
github.com
This is so interesting and seems obvious in retrospect, but super impressive! The code is simple too, going to hack around with this over the weekend :)
But anyway, it's the same here except that of course AI and machine learning is a far vaster topic than React so there's going to be more than twenty terms to learn.
These image models are trained on 1000 steps of noise, where at 0 no noise is added to the training image and at 1000 the image is pure noise. The model's goal it to denoise the image, and it does this knowing how much noise the image has, this makes the model learn how much it should change the image, for example at high noise it changes a lot of pixels and starts building the overall "structure" of the image, and a low noise it changes less pixels and focuses on adding details.
To use the model you start with pure noise, then the model iteratively denoises that noise until a clean image shows up. A naive approach would take 1000 steps, this means you run the model 1000 times, each time feeding the previous result and telling the model that the noise decreased by 1 until it reaches 0 noise. This takes a long time, up to 15 minutes to generate an image on a mid-range consumer GPU.
Turns out when you give the model pure noise and tell it there's 1000 steps of noise, the result is not an image that has 999 steps of noise, but an image that looks like it has much less, this means that you can probably skip 50-100 steps of denoising per iteration and still get a very good picture, the issue is: what steps to pick? You could again take a naive approach and just skip every 50 steps for a total of 20 steps, but turns out there's better ways.
This is where samplers come in, essentially a sampler takes the number of steps you want to take to denoise an image (usually ~20 steps) and it will--among other things--pick which steps to choose each iteration. The most popular samplers are the samplers in the k-diffusion repo[1] or k-samplers for short. Do note that samplers do much more than just pick the steps, they are actually responsible for doing the denoising process itself, some of them even add a small noise after a denoising step among other things.
The newest open source model, SDXL, is actually 2 models. A base model that can generate images as normal, and a refiner model that is specialized on adding details to images. A typical workflow is to ask the base model for 25 steps of denoise, but only run the first 20, then use the refiner model to do the rest. According to the OP, this was being done without keeping the state of the sampler, that is they were running 2 samplers separately, one for the base model and then start one over for the refiner model. Since the samplers use historical data for optimization, the end result was not ideal.
I’ve used some of your ideas for inspiration for ArtBot (mobile friendly web front-end for the AI Horde distributed Stable Diffusion project).
I love seeing updates to it. Keep it up! (SDXL is so much fun)
> Coming soon ...
Ah well. Hopefully it is soon. Also, on behalf of all Apple Silicon Mac users, would be nice if the author looked into implementing Metal FlashAttention [1].
Right now though the process I have is to make 16 at a time with various settings and seeds and then run my phone over them all and see which ones the camera can read as QR codes. Finding one that is both nice to look at and reads reliably is rare.
Except prompt-based tweaking doesn’t work very well in MJ; certainly not as well as manually-directed in-painting and out-painting. It’s virtually impossible in MJ to hold one part of the image constant while adding to/modifying the remainder.
I am not sure what I would have expected upon reading this comment, but I was not prepared.
(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)
Otherwise the main use case I have for a commit message is that it fills out the GitHub PR for me with something useful.
Focus on what/why in your commit messages.
If you can’t articulate that in your commit messages, I can almost guarantee you’re thinking deeply enough about your code changes.
Your style of commit message is a crime against the future. It makes it impossible for a future developer to understand why you did something or what you were thinking.
(unless of course the author is a stickler for inline comments, which I also approve of)
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`.
My biggest discovery so far is using shuffle to guide the output style (and curating a folder of great style guide images).
Anything better than X forwarding?
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 :)
"RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx"
Maybe it can get modified to use DirectML? Although it looks like it's using PyTorch 2.0, and I think torch-directml only supports 1.13. Why is ML and GPGPU such a dependency mess?
For those that don’t know, the Adetailer extension for Auto1111 does a second pass on faces at a higher resolution and then inpaints them back in.
Lots of the changes just... make sense.