AI generating images

Off topic discussion. Talk about gaming and life in general. Be awesome to each other.
User avatar
Orbarth
Posts: 61
Joined: Wed Aug 07, 2019 10:37 pm

AI generating images

Post by Orbarth »

As it seems those things are on the rise, let's give them a good try as you can sometime obtain rather impressive stuff with nearly no effort

An example of how to use https://www.mage.space/
It's free to use and online (there are some AI that you can just use on your computer but you need strong CPU and strong GPU that i don't have)
It is using the StableDiffusion AI that is open source.

You'll need to login to have access to the Advanced Mode features, it's free don't worry.

First as i have roughly an idea of what i want it to generate (some guy in heroic fantasy setting wearing some kind of leather vest), i'll create an image guide on an image editing/painting program based on color shapes :
Image
as you can see something super simple with no artistic effort at all
save it as jpg or png it does not matter as the mage website version of StableDiffusion can read both format

Then on the mage website, i click on the little icon right next to the arrow on the end of the Prompt line, upload my quickly made guide image and set that image "Prompt Strength" to 0.7

The image prompt strength will influence how much the AI will be constrained to the picture (when you set a low prompt strength) or be less constrained by it (higher value) to follow a bit more what you have typed in the prompt.

Now back to the prompt, as i want something in the style of Boris Vallejo (one of my favorite artist of heroic fantasy of old) , i'll type
painting of a man wearing a leather armor in a summer weather, detailled, masterpiece, art by Boris Vallejo


Then i enable the Advanced Mode and in the negative prompt i add, as many people do :
lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, out of frame, extra fingers, mutated hands, poorly drawn hands, deformed, blurry, bad anatomy, bad proportions, extra limbs, cloned face, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, face out frame, head out frame, body out frame, out of focus, out of frame
the negative prompt is supposed to be about things you don't want the AI to do, it's useful to limit how badly it will make things sometime.

Anyways, i run (i click on the arrow next to the Prompt line) and after a few seconds i obtain
Image

Not bad at all, usually i need to re-run a few times until i get something i feel has potential, here the potential is there it's just the background that is crap, perfect for the next step :

I save (button Download) the generated picture and at the Image Guide i clear the one i had and upload this new one instead.

Still at the image guide, on the bottom at "Inpainting" i click on Custom, i setup the brush size and paint over the whole area around the character , that masking is supposed to tell where we want the AI to rework things, any area not inpainted should then be kept as is on the next run.
Image

I setup the Prompt Strenght to 0.6 as i want the Ai to be more constrained so the result should still keep the feeling of what i wanted.
As it will work only in the surrounding landscape, i can change the prompt, and will do now :
forest and mountain landscape in a summer weather, detailled, masterpiece, art by Boris Vallejo
Then i run the prompt, and obtain
Image

quite nice for something that required nearly no effort.
and with some tweak in the prompt, artist style, or image guide you can get a wide variety of results
ImageImage
(Frank Frazetta then Luis Royo for the artist style on those, some old favorites artists of mine too)

Take note that it may need a bunch of Re-run to generate something good, so don't despair if after 2 or 3 re-run it's still not satisfying, you may just need more luck (and maybe some more prompt , slider or/and image tweaking).
I wonder what kind of fun you can have with some Daggerfall screenshot and turn them into cool artwork in the style of various artists

Some useful links :
https://haveibeentrained.com/
This to search for a keyword, artist name, etc... to see what kind of image the AI has been trained with, it's useful because sometime some keyword or artist name may not lead to what you think it should, the kind of image it was trained with can explain those annoyances.

http://lexica.art/
This one is to search for some kind of image and see what was used as a prompt to generate them, useful to learn how to make a prompt that have more chance to generate what you want instead of random bizarre deformed oddities

But all is not all fun and giggle, there are legit concerns that are starting to appear
https://www.technologyreview.com/2022/0 ... -about-it/
and recently you had that happening too :
https://www.businessinsider.com/ai-art- ... ?r=US&IR=T

One can start to imagine what will happen when those AI algorithm will have improved much more as it's been only a few years in and you can see what those AI can do already.

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: AI generating images

Post by King of Worms »

Last two images are quite moody and inspire imagination, like a fantasy paintings should, its really nice style. Thanks for sharing!

User avatar
Orbarth
Posts: 61
Joined: Wed Aug 07, 2019 10:37 pm

Re: AI generating images

Post by Orbarth »

Can take lots of time with prompt tweaking, inpainting masks, reworking prompts again , but sometime it can be lead into some interesting results
Image

Image
(the artist style the AI tried to badly imitate there is from the very talented Marc Simonetti)
Maybe for those AI rescaled pictures in some Daggerfall mods, it could have some usefullness too to create details where the upscaling made a blurry undetailled mess.

User avatar
Orbarth
Posts: 61
Joined: Wed Aug 07, 2019 10:37 pm

Re: AI generating images

Post by Orbarth »

A quick test with this image as guide
Image

Using the image strength at 0.6
the prompt
bald old man, inkeeper, dressed with medieval clothes, in the style of Boris Vallejo
the negative prompt
hat, face out frame, head out frame, lowres, text, error, cropped, low quality, jpeg artifacts, ugly, duplicate, out of frame, extra fingers, mutated hands, deformed, blurry, cloned face, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, body out frame, out of focus
And a couple of the results of some re-run
Image Image

I think there's a lot of potential with this kind of thing.

User avatar
ByteMixer
Posts: 153
Joined: Sun Mar 25, 2018 4:43 am
Location: Philadelphia, PA, USA
Contact:

Re: AI generating images

Post by ByteMixer »

AI art generation has come a long way very recently, especially with things like Stable Diffusion, and it's pretty impressive.

I just recently upgraded my PC (Ryzen 5070X, and RTX3060) so I can run Stable Diffusion locally via ArtRoom. For the daggerfall street scene image as the starting image, I can generate variants at about 5 to 8 iterations per second depending on the resolution. So, e.g. Euler_Ancestral model, 50 steps, takes less than half a minute for the Daggerfall image below.

I'll attach some variants I just generated. Some of these are more or less faithful depending on the strength of the variation.

00057_Daggerfall_street_scene_tree_in_the_foreground_in_front_of_the_wall_gate_medieval_buildings_city_gat_seed_725894328.jpg
00057_Daggerfall_street_scene_tree_in_the_foreground_in_front_of_the_wall_gate_medieval_buildings_city_gat_seed_725894328.jpg (52.4 KiB) Viewed 4992 times
00019_Daggerfall_street_scene_tree_in_the_foreground_in_front_of_the_wall_medieval_city_gate_inn_cobblesto_seed_585978651.jpg
00019_Daggerfall_street_scene_tree_in_the_foreground_in_front_of_the_wall_medieval_city_gate_inn_cobblesto_seed_585978651.jpg (54.53 KiB) Viewed 4992 times
00002_Daggerfall_street_scene_medieval_city_gate_inn_cobblestone_streets_distant_mountains_seen_over_the_w_seed_1599430265.jpg
00002_Daggerfall_street_scene_medieval_city_gate_inn_cobblestone_streets_distant_mountains_seen_over_the_w_seed_1599430265.jpg (80.76 KiB) Viewed 4992 times
"Whatever you do, make good art." - Neil Gaiman

User avatar
ByteMixer
Posts: 153
Joined: Sun Mar 25, 2018 4:43 am
Location: Philadelphia, PA, USA
Contact:

Re: AI generating images

Post by ByteMixer »

Here's one of the barkeep/innkeep. Using the Anything V4 model, so it has an anime bent to it. :P To get away from the pixelation, I had to go with a variation strength of about 0.6.
00019_plump_older_bartender_surly_expression_balding_double_chin_no_glasses_on_face_no_beard_holding_a_rag_seed_3445775552.jpg
00019_plump_older_bartender_surly_expression_balding_double_chin_no_glasses_on_face_no_beard_holding_a_rag_seed_3445775552.jpg (45.76 KiB) Viewed 4991 times
00022_plump_older_bartender_surly_facial_expression_balding_double_chin_no_glasses_on_face_no_beard_holdin_seed_1567564338.jpg
00022_plump_older_bartender_surly_facial_expression_balding_double_chin_no_glasses_on_face_no_beard_holdin_seed_1567564338.jpg (48.45 KiB) Viewed 4991 times
00036_Old_man_clean_shaven_plump_bartender_holding_a_cleaning_rag_apron_green_shirt_blue_pants_brown_boots_seed_3456240908.jpg
00036_Old_man_clean_shaven_plump_bartender_holding_a_cleaning_rag_apron_green_shirt_blue_pants_brown_boots_seed_3456240908.jpg (49.02 KiB) Viewed 4991 times
"Whatever you do, make good art." - Neil Gaiman

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: AI generating images

Post by King of Worms »

The Orbarths NPCs are brutal :) I can imagine, this will work in a future, in real time. Running a old game, looking completely incredible... I think the PC graphics is waiting for a generation shift, something has to change, to reach much further echelons, and I think AI seems to be that.

User avatar
Orbarth
Posts: 61
Joined: Wed Aug 07, 2019 10:37 pm

Re: AI generating images

Post by Orbarth »

The AI sure improved a lot, especially with how some people can personnally train said AI to their own needs, there are now plenty of models specialised into specific category (anime, realism, landscapes, cartoon, etc...) that are really doing quality work and that you can use (if you have the required hardware) on your own computer without having to rely on some internet website.

From what i read, if you have a strong computer (especially the graphic card as the GPU is what's doing the most calculation) One of the most popular of said local tool should be this one :
https://github.com/AUTOMATIC1111/stable-diffusion-webui

After that you can install any other models into it to benefit from their specialization.

I wonder how that technology will evolve in a few more years, it has already progressed in an impressive way in only a couple .
It seems so far to have huge problems with hands, it's really hard to obtain "normal" looking hands from the AI (very impressed by the hands in ByteMixer pictures, when i see the horrors the AI usually does for me :D )

Here some pictures i got the AI to generate, using the "stable diffusion 1.5" model

Image Image
Image Image
Image Image

User avatar
MrFlibble
Posts: 410
Joined: Sat Jan 27, 2018 10:43 am

Re: AI generating images

Post by MrFlibble »

Orbarth wrote: Sat Nov 19, 2022 5:17 pm Maybe for those AI rescaled pictures in some Daggerfall mods, it could have some usefullness too to create details where the upscaling made a blurry undetailled mess.
That could certainly be tried out with static pre-rendered screens like the beta demo loading screen and the "Welcome Adventurer!" defeat screen with the skeletons.

User avatar
ByteMixer
Posts: 153
Joined: Sun Mar 25, 2018 4:43 am
Location: Philadelphia, PA, USA
Contact:

Re: AI generating images

Post by ByteMixer »

Orbarth wrote: Thu Feb 02, 2023 4:24 pm From what i read, if you have a strong computer (especially the graphic card as the GPU is what's doing the most calculation) One of the most popular of said local tool should be this one :
https://github.com/AUTOMATIC1111/stable-diffusion-webui
Currently, I'm using Artroom for Stable Diffusion (and they've got a pretty good discord for it). It can be a little bit of a hassle to install as sometimes the install fails or goes a little weird. Also, sometimes Avast just likes to straight up delete Mini Conda/PyTorch. Ugh!!!

One of my reasons for upgrading my GPU last Christmas was so I could run it and generate decent sized images without running out of VRAM. (I got an RTX 3060 w/ 12GB VRAM) I moved my older GTX 1660 Super up into the upstairs computer which is primarily used for audio mixing. I also switched to a Ryzen 7 5700X for the downstairs computer. THAT was a hassle since I had to upgrade my motherboard's firmware to support the newer CPU. But it works fine. Er, I guess the art generation and also being able to more smoothly play Star Citizen.
"Whatever you do, make good art." - Neil Gaiman

Post Reply