Live data from Hacker News

Try Stable Diffusion's Img2Img Mode

huggingface.co

111–120 of 166 posts

Re: Try Stable Diffusion's Img2Img Mode

#111
post #13

If you have a GPU with >4GB of VRAM and you want to run this locally, here's a fork of the Stable Diffusion repo with a convenient web UI: https://github.com/hlky/stable-diffusion It supports both txt2img and img2img. (Not affiliated.) Edit: Incidentally, I tried running it on a CPU. It is possible, but it took 3 minutes instead of 10 seconds to produce an image. It also required me to hack up the script in a really…

Nvidia GTX 1660 Super with 6GB of VRAM.

I do runs at 384px by 384px, with batch size of 1. Sampling method has almost no impact on memory. Using k_euler with 30 steps renders an image in 10 to 20 seconds. The biggest thing that affect rending speed is the steps and the resolution, so 512x512 with C 50 using ddim is much slower than 256x256 with C 25 using k_euler.

The sampling methods run mostly in the same timelines, but the k_euler one can produce viable output at lower C values, meaning it is faster than the rest.

Don't add gfpgan in the same pipeline, as it takes more vram.

I'm running it on Windows 10 with latest drivers. I set the python process to Realtime priority in task manager (makes a slight difference!). Have not tried it on Linux.

Re: Try Stable Diffusion's Img2Img Mode

#112
post #67

I've been trying to get some sensible images out of my descriptions, but I fail miserably. In this case I had the prompt "cow chewing bone" with 4 squares representing the two pair of feet, the body and the head. None cared about chewing on a bone. With DALL·E 2 I tried to get an image of a little girl building sandcastles and a monster threatening her: "little scared girl building a sandcastle and a big angry monste…

Yes, checkout examples on lexica or use a prompt builder to help, like promptmania.

Also, most of the good ones you see online are cherry picked from hundreds of runs, so set your batch size too 1000 and go to bed! After that, people then tend to run some of the good results through img2img, also with a lot of variations produced from a single image. Finally, some people also run them at higher resolutions if they have enough VRAM, as smaller resolution can distort or generate rubbish. For the messed up faces, they run it through gfpgan a few times to get prettier faces. Other than that, it is pure luck (using random seeds) to figure out what works and what doesn't. Use the 2 sites above to help you improve your prompts.

(meant in the context of stable diffusion)

Re: Try Stable Diffusion's Img2Img Mode

#114
post #79
post #74

Earlier quoted context omitted.

also on a 1070, I can generate an image in ~15 seconds, surely you're doing something wrong.

What settings are you using it the people with 1080s above you are taking 3 minutes?

I'm using lstein's repository which loads the models and keeps them in memory. Then, for some diffusers 16 steps is enough to come up with a usable image (and using more steps will only add details, most of the time won't change much).

This is for the initial "exploration" step of the process. Once I like an image I typically play with the settings, then in the final step run with a large number of steps (and maybe even use upscaling).

So, default 512x512 size, 16 steps and default for the rest of the settings (I believe 7.5 scale, 0.75 strength).

Having said that, I also tried the official Docker image for stable diffusion and with the default values it generated an image in about 40 seconds.

Re: Try Stable Diffusion's Img2Img Mode

#115
post #4

Well. Apparently "penis on park bench" is an "inappropriate" query. However, "lot of child dying in a massive fire" is an a-okay query with some "interesting" results. Prudes are such a weird bunch.

I’m not gonna lie, I’m quite disappointed at all the anti-NSFW shenanigans.

Run it locally and remove the nsfw filters in the scripts...

Re: Try Stable Diffusion's Img2Img Mode

#116
post #84

Some amazing examples of what people have done with img2img with Stable Diffusion: https://old.reddit.com/r/StableDiffusion/comments/wy7oa5/img... https://old.reddit.com/r/StableDiffusion/comments/wyq04v/usi... https://old.reddit.com/r/StableDiffusion/comments/wzlmty/its...

old.reddit is truly horrible on mobile. Once you click on an image you can't go back. Off topic, but what is the other alternative UI called that people sometimes use?

https://teddit.net?

Re: Try Stable Diffusion's Img2Img Mode

#120
post #96

Earlier quoted context omitted.

With a 3090 it's about 10s to generate a 512x512 image from another, maybe less.

You're probably using the default PLMS sampler with 50 steps. There are better samplers, the best seem to be Euler (more predictable in regards to the number of steps) and Euler ancestral (gives more variation). Both typically need much less steps to converge, speeding up the generation.

Yes I'm using PLMS. Thanks for the tip, will try.
Post reply on HN