Stable Diffusion and Blender?

Stable Diffusion is a new, completely open source (no surprises) and affordable to common users PCs generative image AI: Stable Diffusion launch announcement — Stability.Ai

I wonder if it could be of use for Blender development

Hi.

You might be interested in @carlosedubarreto 's work, especially his recent CEB Stable Diffusion project:
https://twitter.com/carlosedubarret

1 Like

Someone made a plugin for c4d, pretty sure it can be done in blender. not a fan of those things tho :-1:
https://www.reddit.com/r/Cinema4D/comments/x6cdpg/wrote_a_plugin_that_renders_the_cinema_4d_scene/

Might be good for texture tile generation how ever

2 Likes

I started developing a Blender add-on for this last week! It will handle all imports and the downloading of the weights for Stable Diffusion so you don’t have to worry about setting anything up. You can find it here: https://github.com/torrinworx/Cozy-Auto-Texture

It’s by no means complete, however I’m going to be working on it a lot over the next month.

7 Likes

Thanks for tagging me.
Yeah I think I’m developing this addon for more than week. version 0.1 was only a txt2img with few controls, and recently I released a beta version 0.20 that make a lot more.
Now it has txt2ima and img2img.

What I like most on this approach I did on my addon is that you get a fully working Stable diffusion on your own PC (that is good and bad at the same time, because you have to have a GPU card)

Now I’m working on fixing bugs and much more feature, like inpainting.

If you guys are interested, you can get it for free here

One note, there it says it costs $2. I had to do that because gumroad do not allow free downloads if you use more than 250mb of space, and the addon is 600mb

If you want to talk about the addon you can talk with me at my twitter : x.com or my discord channel CEB Studios

10 Likes

Hello Torrin.
Its great…hope your development goes well. And if you are having problem with something, fell free to talk to me, maybe a problem you are having is something I had too and I could give some hint on it.

One more thing, but not related to code. Are you using the hugging face model on your google drive? Because probably it can harm the license use of it.
I’m saying it because for people to download, they have to create an account and agree with a license on their site. if you are storing and sharing the model to people to get, maybe you could be bypassing their license.

Just talking about it, because I’m very worried about this kind of thing, and that is the reason that I do not packed the model with the addon.

If you need something, p´lease let me know. If Ican help, I’ll do it.

1 Like

https://www.reddit.com/r/blender/comments/x75rn7/i_wrote_a_plugin_that_lets_you_use_stable/

Which one of you is this?

Hi @carlosedubarreto, awesome work with the CEB add-on! I’ll definitely reach out as I am running into a few issues with python library imports not functioning with Hugging Face’s Diffusers and Transformers modules: Diffusers issue with importing transformers, numpy, etc · Issue #2 · torrinworx/Cozy-Auto-Texture · GitHub

If you could take a look that would mean the world to me!

As for the topic of Hugging Face’s license, yes I am using their model. The license for SD 1.4 they provide can be found here: License - a Hugging Face Space by CompVis

This section from the license states that you are allowed to redistribute the model as long as you include the license provided inside any distributed versions (which I am):

Section III: CONDITIONS OF USAGE, DISTRIBUTION AND REDISTRIBUTION
4. Distribution and Redistribution. You may host for Third Party remote access purposes (e.g. software-as-a-service), reproduce and distribute copies of the Model or Derivatives of the Model thereof in any medium, with or without modifications […]

However I do express your general concern for the potential misuse. I’m now thinking about adding an agreement checkbox similar to the one Blender includes upon installation that must be checked in order to activate the add-on. My project is still really new so I’m just in the testing phase of it all, just trying to get it to work. My mind is definitely on the license and ethics behind it all.

As of now, I know it’s a bit janky to have it hosted on Google Drive, however I am going to migrate it to AWS S3 storage for more reliable service soon. I’ve tried using GitHub LFS, but unfortunately they have a hard limit on individual file sizes of 2GB. Once I get S3 setup, I’d be more than happy to collaborate with you on a distribution method of the model for both our add-ons.

Let me know what you think!

Thanks a lot. I swear I tried to read their license but there were so many to read and was so confusing :sweat_smile:
Its good to know that so I could host a copy of the data to people to download more easily, thanks a lot.

Another thing, you could host the files at gumroad. They allow free download at max of 250mb, but, you could set the file as paid and add a coupon code for 100% discount at the description, that’s what I do with my addon. So I dont have to bother where I coudl host and also could be used as som sort of portfolio

Hey Torrin! Merry Christmas by the way! What’s your opinion, could Blender render volumetric lights based on Stable Diffusion? Here’s a random bedroom in MJ4, with volumetric lights. What if Stable Diffusion could do the same in a similar way of the texturing in your plugin but way faster than normal renders?