Stable Diffusion AI Image Generator

View attachment 1425463

Deforum. Used a video of Pong^^^ (the old paddle game) as an input and got out a frantic series of disjointed frames. Guess the black background added to the way the images were made. Not that interesting to watch but some decent images in there nonetheless. Started editing it with some music but lost interest as it's just too much to manually sift through.

I haven't really used Deforum with video input as it seems pretty random.

If you use a jpg sequence and bulk IMG2IMG you can refine how much of the original input influences the animation by using the denoising strength, CFG scale and so on, which allows you to control how similar the output is to your original input.
 
Need some Christmas themed beer labels - these are just fun quirky labels for the beer taps

English bitter - Christmas themed badger

1668979416703.png

1668979471260.png

Irish red ale - Christmas themed Irish Wolfhound

1668979564876.png


ah or even better this

1668980225208.png
 
Last edited:
IMG2IMG is probably my favourite aspect of SD... so much potential.
I really like how it lets you shape the aesthetic of the output. Tried that same image with a very simple prompt this time ('creature from another dimension') and got some text for the first time along with some cute results.

00308-1601616755-creature from another dimension.png00317-241104934-creature from another dimension.png00321-241104938-creature from another dimension.png
 
I used a random photo of mine from a while back, ran it through IMG2IMG with some basic text guidance. In photoshop, I then removed the original pigeon, then composited the robotic pigeon back into the original photo... I love this tool.

Robo Pigeon Small.jpg
 
I discovered some lesser known tidbits about SD recently. It turns out you can blend the features of multiple people to essentially create new characters or to average a particular character that has been portrayed by various actors.

In this example I blended together all the actors that have played the role of James Bond...Sean Connery, George Lazenby, Roger Moore, Timothy Dalton, Pierce Brosnan and Daniel Craig even though I blended all six equally, the result mostly resembles Brosnan with some Connery and Craig's bright blue eyes in most renders. Maybe I just don't know Lazenby and Moore well enough to recognise which features are theirs.

View attachment 1424485

View attachment 1424489

And... even what's even more interesting is you can even render this blended character at different ages... here's a younger version of James...

View attachment 1424487


Powerful stuff!
So your hybrid Bond is Jimmy Carr
 
There's another WebUI available for SD, this one supposedly works on PCs with lower spec GPUs. Still NVidia \ CUDA only though.

https://github.com/invoke-ai/InvokeAI

The auto installer (.bat file) didn't work too well for me but I managed to get it up and running by doing the manual install.

InvokeAI has a sleeker look compared to Auto 11111, and it has a very nice "infinite" canvas for outpainting. It doesn't really seem to have much in the way of animations like Automatic 1111 does and it seems a little less flexible but it does have a lot of options built right into the GUI for upscaling, face restoration and so on. I suppose I will use both WebUIs for different things.

Steps for Installing with the bat file can be seen in this video :

 
I trained a Dreambooth model for a specific style of cartoon (Fleischer animation from the 1940s) which came out pretty well as far as landscapes and cityscapes are concerned. Humans are still looking pretty odd \ weird in most renders and sometimes pretty good in others, so I suppose the model needs tweaking or further training to get it closer to 100%. It's not quite an exact science, but I'm quite happy with the initial results for scenery at least.

01288-1421933899-Fleischerstyle landscape of a mountain with a lake and a small village, summe...png

01262-3933520536-Fleischerstyle a cityscape at night.png

01256-2091011914-Fleischerstyle a cityscape at night.png

01279-4260478354-Fleischerstyle closeup portrait of [Henry Cavill as Superman, short cape, red...png
 
Well I refined the Fleischer model a bit and uploaded it for anyone who wants to use it...

00463-3989097446-Fleischer Style an isometric neo-gothic city street at night, high contrast, ...png
00204-1570820587-Ian McKellen as Gandalf, cinematic, creative composition, flat colors, 8k, co...png
00514-1090156860-Fleischerstyle closeup portrait of Emma Watson wearing a 1940s evening dress,...png


00475-3834146410-Fleischer Style an isometric neo-gothic city street at night, high contrast, ...png

You can get it on CivitAI
 
Then I assume you're on default doggettx.

It's Facebook's transformer accelerator. You should try xformers, especially those who are strapped for VRAM when running a higher batch size like 8 to increase speed.
If you're not starving for VRAM and can already comfortably run a batch size of 8, then improvements will come from lower VRAM bandwidth usage, thus quicker results.

Example VRAM usage on a 1060 6GB:

-Default doggettx
--Batch size 1: 4.64GB
--Batch size 4: 5.94GB

-Xformers:
--Batch size 1: 3.87GB
--Batch size 4: 4.94GB
--Batch size 8: 5.95GB

Due to being able to increase batch size to 8, per-image generation time has improved by 15.7%

Expected improvements should be much higher on 20xx, 30xx, and 40xx cards.

Ensure you're on the latest Automatic1111 SD-webui build.

If you have a Pascal, Turing, Ampere, or Lovelace card then in webui-user.bat, just add --xformers to COMMANDLINE_ARGS.

Code:
set COMMANDLINE_ARGS=--xformers

It will download the relevant xformers build for your GPU architecture and install it.

To go back to how it was before, just remove --xformers and it'll default back to doggettx.
 
Then I assume you're on default doggettx.

It's Facebook's transformer accelerator. You should try xformers, especially those who are strapped for VRAM when running a higher batch size like 8 to increase speed.
If you're not starving for VRAM and can already comfortably run a batch size of 8, then improvements will come from lower VRAM bandwidth usage, thus quicker results.

Example VRAM usage on a 1060 6GB:

-Default doggettx
--Batch size 1: 4.64GB
--Batch size 4: 5.94GB

-Xformers:
--Batch size 1: 3.87GB
--Batch size 4: 4.94GB
--Batch size 8: 5.95GB

Due to being able to increase batch size to 8, per-image generation time has improved by 15.7%

Expected improvements should be much higher on 20xx, 30xx, and 40xx cards.

Ensure you're on the latest Automatic1111 SD-webui build.

If you have a Pascal, Turing, Ampere, or Lovelace card then in webui-user.bat, just add --xformers to COMMANDLINE_ARGS.

Code:
set COMMANDLINE_ARGS=--xformers

It will download the relevant xformers build for your GPU architecture and install it.

To go back to how it was before, just remove --xformers and it'll default back to doggettx.
Thanks, it does seem a bit faster... I have a 3060 with 12GB VRAM which pretty much handled everything I threw at it just fine... even batches of 8-12. But I won't say no to a speed boost.
 
Thanks, it does seem a bit faster... I have a 3060 with 12GB VRAM which pretty much handled everything I threw at it just fine... even batches of 8-12. But I won't say no to a speed boost.
How much of a speed increase did you notice?

On newer cards people report anything from 20-50% increase in it/s depending on workload.

Example: this is a Reddit user with a 2060 before and after xformers.

22% increase.

Before:
1670336575657.png

After:
1670336587067.png

Just to make sure, your CMD should say this.

venv "snipped\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)]
Commit hash: 44c46f0ed395967cd3830dd481a2db759fda5b3b
Installing requirements for Web UI
Launching Web UI with arguments: --xformers
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Loading weights [7460a6fa] from snipped\stable-diffusion-webui\models\Stable-diffusion\model.ckpt
Applying xformers cross attention optimization.
Model loaded.
Loaded a total of 0 textual inversion embeddings.
Embeddings:
Running on local URL: http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
 
Top
Sign up to the MyBroadband newsletter
X