Yeah, I created an AWS Lambda function... which right now is still in the free tier. Thanks to everyone on this thread, I will check into other options for both cloud and local.
I'm using 1 GB of ram, so for a call that takes 5 seconds, it costs $0.0000833335. Which is 8 cents for 1000 images (512x512). And that's after the free tier.
Good question. I actually didn't look into it that deeply. My guess is that Lambda functions use the same (or similar) hardware that EC2 instances have. Here's a high level page about it. Not sure if there is more in-depth info anywhere else: https://docs.aws.amazon.com/dlami/latest/devguide/gpu.html
Oh, I just realized that the other answer to your question is that my lambda function is actually just a wrapper for the DreamStudio API. So the actual heavy lifting is happening on DreamStudio's end, rather than in the lambda.
You could use stablecabal.org server. It also uses grpc so it is a drop-in replacement. Also it has got one-click installer. So it would be only an URL you have to provide - everything else should be the same.
Thanks for letting me know about this! I will check into it. (This is OP, with a temporary new account, because apparently I shared about this add-on too much and got suspended for 3 days 😅)
I was wondering how you solved grpc in Blender plugin and checked your code because I have similar problem in my Krita plugin. But you do a REST to an AWS URL. I guess this is a bridge server here - is it your server or an open one? With this solution it would be difficult to use another grpc server which is not available in internet in my opinion (e.g. localhost).
Yeah, I made a lambda function to run the stability sdk. Not the greatest longterm solution, but I am hoping that more services will open up in the near future.
Hello, I have nearly finished grpc for my Krita plugin (no pip install needed). I guess environment is similar to Blender. I will put it online later so it should be easy to integrate in your plugin. I also can give you some tips here.
This is a fantastic tool, but as some other people pointed out, it'd be nice if it could also work with a local install, especially at this moment, there's a lot of experimentation going on, and paying for every generation is way beyond budget, at least in my case, I'm over 20000+ generation and it's only been a month or so...
It'd also be cool to have the option of simply sending the render/screen capture to Stable Diffusion and being able to use that interface (a sort of live link).
Edit: by the way, thank you very much for sharing!
I believe there are a lot of people doing some serious use of SD. Automatic1111's repo (and possibly others) let you modify the max batch value so you can essentially have running for hours without supervision, in fact, I've read of some people setting the batch count at 2000 and leaving it working overnight...
In any case, thank you very much for considering these changes!
We would be more than happy to fund you if you set up a patreon or go fund me. Since the geometry nodes and hair curves, I'm very confident that blender will over take industry standard 3d software within the next 5 years.
Awesome, and yes thanks for the clarification, I think automatic is the safest bet if you ask me (has official integration with deforum now too) and I love to use their x/y script
Thank you very much, anywhere we can follow you like gh/twitter/whatever for updates?
So just to confirm, you're not actually re-rendering the scene in blender after stable diffusion is done, right? Your add-on takes the current view of a scene already in blender and sends that as an igm2img to stable diffusion? Sorry if I misunderstood.
Yep, that's exactly right. (This is OP, with a temporary new account, because apparently I shared about this add-on too much and got suspended for 3 days 😅)
That's actually how the add-on works. Besides doing the work of transporting the file, prompt, etc, it adds a small node group to the compositor which contains the SD image. There's probably potential to do lots of fun blending between original rendered image and the SD one.
I actually do something similar but with a few more steps: Create my stuff in Blender, export an image, and feed it into img2img. Got a brutalist study in progress using that method.
I've been doing a lot of that as well. Abstract art and img2img make for a great combination. It really gives your imagination a workout. I posted a bunch of my experiments to Twitter. It would definitely speed up the experimentation process a bit to have it integrated in Blender, though for me it would need to be a local install. Does it save the before and after images, or just the transformed result?
when using this with eevee, I tried render settings of 16, 32 and 64 and it didn't seem to make any difference at all. does this sound correct, or was my image just not indicative?
love this add-on so much! you have my eternal gratitude
If you're saying that it didn't change the rendered image, then something went wrong. I'd suggest updating AI Render (through the add-on preferences) and then make sure it's set to "render automatically" under the "Operation" panel of AI Render
sorry, I meant to say that SD returned the same result for each attempt, regardless of the render setting value. so my question was "does the render setting value matter in eevee?"
I haven't done exhaustive testing, just wondered if you knew...
Ah, gotcha. in that case, it’s either that the seed isn’t random (check the "random seed" checkbox in AI Render) or the Image Similarity is too high (turn that down in AI Render)
I think a panoramic camera works just fine. The only catch is that the image output width/height have to be one of these values (in any combo): 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024.
That's a limitation of Stable Diffusion and the way the models were trained. You could work around this by rendering in a supported image output size and then cropping to your desired size in post.
This is what I've been waiting for, especially for animation! But I'll also have to wait for a local way to use this, got a nice GPU for it, thank you so much for your efforts in any case <3
Funny to see a post about SD and Blender given how frequently I need to check whether I’m viewing a post from r/stablediffusion or r/blender while browsing Reddit lol
I think that's what painters said when photography came out. But seriously, valid point. I think of AI image generation as just one more new tool in the tool belt. I don't think it will ruin existing forms of art, or make artists obsolete.
Btw, is it really a good idea to include presets with names of living artists?
Personally I don't have a problem with that, I understand how it works (in general terms); but I've been seeing lots of people freaking out about AI "stealing" art or some other nonsense, and I suspect this could risk attracting some negative attention...
I think this is a complicated issue, for sure. I almost hesitate to express my opinion, because I think there are much smarter people than me talking about this. I'd suggest that it's important for AI models to allow artists to opt out, and I would guess that this will happen more in the near future. For the moment, I hope it actually brings positive attention to the work of talented artists.
Yeah, it's amazing to see how quickly new tools are coming out, and how quickly people are making incredible creations with them! Literally every day something new happens... phew.
Care to describe your workflow? I spent a couple of hours trying to img2img on my renders and nothing good came out of it... I tried with various parameters, sampling method, denoising factor, etc.... and I previously had quite a good results with img2img on simple drawings...
39
u/nefex99 Oct 15 '22
Get it for free here: https://airender.gumroad.com/l/ai-render
116
u/LadyQuacklin Oct 15 '22
Cool idea to use a viewport capture as img2img input, but having it to use dreamstudio instead of a local installation is a pass for me.
30
u/Kaennh Oct 15 '22
This is a fantastic tool, but as some other people pointed out, it'd be nice if it could also work with a local install, especially at this moment, there's a lot of experimentation going on, and paying for every generation is way beyond budget, at least in my case, I'm over 20000+ generation and it's only been a month or so...
It'd also be cool to have the option of simply sending the render/screen capture to Stable Diffusion and being able to use that interface (a sort of live link).
Edit: by the way, thank you very much for sharing!
3
u/NextJS_ Oct 15 '22
Could it ever run on local_ with automatic or invokeai_?
Thanks great software
2
u/artthink Oct 16 '22
aww why not run locally? Solid looking add-on though.
24
u/Potential_Smell_9337 Oct 15 '22
So just to confirm, you're not actually re-rendering the scene in blender after stable diffusion is done, right? Your add-on takes the current view of a scene already in blender and sends that as an igm2img to stable diffusion? Sorry if I misunderstood.
9
u/classicwfl Oct 15 '22
I actually do something similar but with a few more steps: Create my stuff in Blender, export an image, and feed it into img2img. Got a brutalist study in progress using that method.
1
u/nefex99 Oct 21 '22
For anyone here who asked about local installation, I just released a beta version that supports it with Automatic1111's web ui.
Check it out and let me know how it works for you! https://github.com/benrugg/AI-Render/wiki/Local-Installation
4
u/Big-Combination-2730 Oct 15 '22
Holy crap that's awesome!
4
u/22marks Oct 15 '22
This is awesome. Especially knowing in the not so distant future it will render textures and geometry.
I’m wondering if the next version could support animation? Basically like the video img2img we’re seeing.
1
u/alxledante Feb 03 '23
when using this with eevee, I tried render settings of 16, 32 and 64 and it didn't seem to make any difference at all. does this sound correct, or was my image just not indicative?
love this add-on so much! you have my eternal gratitude
2
u/[deleted] Oct 17 '22
That's great. I'm assuming it can't be used with panoramic rendering?
1
u/brightlight753 Oct 15 '22
This is what I've been waiting for, especially for animation! But I'll also have to wait for a local way to use this, got a nice GPU for it, thank you so much for your efforts in any case <3
1
u/[deleted] Oct 15 '22
Funny to see a post about SD and Blender given how frequently I need to check whether I’m viewing a post from r/stablediffusion or r/blender while browsing Reddit lol
1
u/fegd Oct 15 '22
This is amazing
1
u/HetRadicaleBoven Oct 15 '22
Is there a Blender plugin yet to generate textures with SD?
1
u/jsideris Oct 16 '22
Finally a way to make photorealistic scenes while knowing jack shit about lighting, cameras, reflections, and perspective.
1
u/CameronSins Oct 16 '22
absolutely badass
1
u/_Alistair18_ Oct 16 '22
Does blender render the images before the sd render?
1
u/TiagoTiagoT Oct 16 '22 edited Oct 16 '22
Btw, is it really a good idea to include presets with names of living artists?
Personally I don't have a problem with that, I understand how it works (in general terms); but I've been seeing lots of people freaking out about AI "stealing" art or some other nonsense, and I suspect this could risk attracting some negative attention...
1
u/Valdaora Nov 01 '22
Why don't you just take a screenshot?
0
u/Sillainface Oct 16 '22
If Local yes, DS, nah. Nice btw.
2
u/[deleted] Oct 16 '22
[removed] — view removed comment