Copyright and media elements

If you try to look for pictures, logos, banners and other media elements here on the internet, you won't find anything like that. The media in this blog is 100% unique. There will be (maybe) similar stuff, but not this. And I'll tell you something: I don't know how to draw with that quality.
There is no magic at all, of course, right now there are two options, well, three:
- I have a friend who knows how to draw and I'm exploiting them
- I'm paying a designer to create them
- I'm using an open-source AI hosted in my house to generate 2K images
I wouldn't do that to any friend, even if they offer work like that must be rewarded. I don't have enough budget to pay for the hundreds of images I'd need. So the only option is the third, of course, but is it possible?
The obvious answer is yes, and you can find thousands of pages and tutorials explaining how to run it locally, but if, like me, you're running a laptop and even maybe some corporate laptop with the worst graphic card in the world, generating an image of 512x512 pixels would take hours, if possible at all. And I'm taking "only" around five to eight minutes. So you need something outside of your laptop that can be running for a long period of time and where you can connect at any time and start creating pictures. But before that, I'm sure you are thinking, "Eight minutes? Are you kidding me?" Let me explain that a little bit.
Why do you need your own AI instance?
In the instantaneous world where we're living, eight minutes must look like an insane amount of time when I can go to any Flicker, Google Images, Pinterest or DeviantArt and pick one in seconds. But the ones I'm mentioning are royalty-free and this, my friend, is the key.
We're paying for the uniqueness and copyright-free images at the only cost of you waiting eight minutes. And I'm talking about using a really low-budget infrastructure to create them. If you have something newer & powerful, you can easily swap between minutes to seconds.
Also, you're getting exactly what you want (faster). I have been working with designers for more than 10 years now, and the main issue is always the same thing: "The person in front of you is a human with his own unique context, and he/she won't understand exactly what you want just with your first description"
So you will iterate, first description -> first sketch, then refine your description and get a second sketch... until you reach an acceptable result. With the AI, the same will happen, but each iteration is eight minutes. I'm sure that now is not such a big deal compared with how to get it from the designer. I'll post a blog entry showing the iteration of 5 steps and how everything evolved.
But why not take a royalty-free picture from the internet? You perfectly can, but you need to cross through three steps:
- Have a very clear picture of what you want, with experience this can happen faster, but typically, you'll have an overall idea and, by watching stuff, you'll refine it == Time
- Find the exact picture that fits your web/game/site/blog/video style == Time.
- If it doesn't fit, you need to open Photoshop/Gimp and start editing (if you have enough knowledge, if not, learn Time) == Much more Time
So again, it is free if you don't value your time or you don't care about the overall result. Perfect, now you're convinced that you need your own hosted AI but; How?
You'll find a much more detailed guide in my videos (in the future), but for the moment you need this:
- An old PC, maybe a 7th gen Intel and 16Gb of RAM
- An old graphic card, I'm using the Nvidia RTX 1060 6GB VRAM
- 1Tb of disk space, models consume a lot of disk
- Knowledge about Linux (yeah, Linux, I'll talk about it too)
- An SSH Client in your Laptop (if you are using Windows (((really?))) Putty would work perfectly
Deployment Steps
The first step is to install Linux on your Old PC, I love Fedora 37.
At the moment of this post, DON'T use Fedora 38, Cuda is not compatible and you'll find a hard time with that, forget using the latest one and go straight with the latest compatible, 37.
There are plenty of tutorials; by using Rufus or dd you can easily create a bootable USB. Launch the live version, install it and enter into your machine.
Again, someone is maybe thinking about using VMs. Let me save you some crisis moments: Configure Proxmox, KVM or Xen to transfer hardware, like your graphic card, directly into a VM is not an easy task and not all the motherboards accept it, you need IOMMU technology
Now, the second step is to install Nvidia drivers, Fedora has a nice repository, but in my experience, it is much better to use the driver directly from their page. Don't forget to disable nouveau!
The third step is to download some software, Stable Diffusion web UI, despite the fancy name, If you need to find any issue, search in Google with the "Automatic1111 <your issue>".
To launch it faster, I created an alias in my ".bashrc" file with the parameters I'm using, I recommend using for SD 1.5 or SD 2.x (low res versions) the next command line:
alias stablediff="cd stable-diffusion-webui && ./webui.sh --xformers --reinstall-xformers"
And for SDXL, the larger version (and assuming you're using low-capable hardware):
alias stablediffxl="cd stable-diffusion-webui && ./webui.sh --xformers --reinstall-xformers --medvram --no-half-vae"
I strongly recommend you avoid XL for the moment. Ok, now, you'll have a web page in a localhost, of your remote machine. The best option, again, is using SSH port forwarding, reaching the fifth and last step:
ssh aiserver -L 7860:127.0.0.1:7860
Ideally, you should run first this, and the commands before so you can reuse your ssh connection to launch the client. The only thing you need to do is go to your Firefox/Chrome and launch http://localhost:7860 and BAM! You have your self-hosted AI.
About how to use it, not today, in another entry!