Home

Awesome

Solvent

AI-Assisted Texture Generation Toolkit in Blender

Features

Prerequisites

Ensure that you already have the following software installed, preferably the latest versions:

If you are on MacOS and Linux, you would also need to install Rust. This is because the transformers Python library uses the tokenizers library's wheel built in Rust.

Additionally, you would also need to have a Hugging Face account to download the pre-trained Stable Diffusion model checkpoint weights. You would need to agree to the Terms and Conditions stipulated by the CreativeML Open RAIL-M License here before you are able to download their pre-trained model weights.

Optionally, you might want to create a GitHub account as well to raise issues or pull requests to this repository.

Instructions

Note that if you are on Windows, you would need to run Blender (and hence, the add-on) as administrator with Internet connection in order to install all of the necessary Python packages. This only needs to be done once.

Otherwise, you would need to install Blender by visiting the official site here instead of using other methods (i.e., such as using a package manager or snap):

Do also ensure that you possess the appropriate permissions to access the directory that you install Blender to.

  1. Download the latest version of the add-on files from this repository:

    git clone --recurse-submodules https://github.com/jamestiotio/solvent
    

    Note that the size can be quite large as it includes the pre-trained Stable Diffusion model checkpoint weights. Depending on your Internet speed, you can go get a cup of coffee while waiting.

  2. Zip up the solvent folder that has been cloned. This would create a solvent.zip file.

  3. Install the add-on by opening Blender and following the instructions on the official Blender manual here. Follow along the instructions to also enable the add-on.

  4. Since the add-on will need to download and install additional Python packages, you can trigger the installation manually by going to Edit > Preferences > Add-ons and click the Install Python packages button. Don't worry if Blender seems to hang and not respond for a while. You can monitor the progress of the installation in Blender's Console Window. If you are on Windows, it will be automatically opened when the aforementioned button is pressed. Otherwise, you might need to run Blender from a terminal and view the Console Window output there instead. Depending on your Internet speed, you can go get another cup of coffee while waiting. After the installation has finished, you would need to restart Blender.

  5. Enable the Sidebar (go to View > Sidebar or click the N key) if it is not enabled yet. You can then go to Sidebar > Solvent and input your parameters to generate the texture that you want. After setting the parameters to your heart's content, press the Generate Texture button and wait. This might take a while on a CUDA-compatible GPU and even longer on a CPU. Depending on your CPU/GPU's speed and the parameters that you have chosen, you can go get yet another cup of coffee while waiting.

  6. If you have selected an object/mesh before generating the texture, the add-on will also attempt to automatically apply the texture (or the first generated texture, if you have indicated to generate multiple texture images) to the currently-active material (as the Base Color of the Principled BSDF node). Otherwise, you can find the texture image in the folder that you have specified and you can apply it to the material yourself.

  7. ???

  8. Profit!!!

Requirements

On top of Blender's requirements specified here, you would also need:

Known Issues

TODOs

If you encounter any problems or have any suggestions, feel free to raise an issue or a pull request!

Licenses

This add-on is licensed under the GNU General Public License v2.0 as attached in this repository here, the same license that Blender uses.

This project depends on the following packages:

PackageLicense
PyTorchBSD 3-Clause "New" or "Revised" License
DiffusersApache License 2.0
TransformersApache License 2.0
SciPyBSD 3-Clause "New" or "Revised" License
ftfyMIT License
spaCyMIT License

Furthermore, this project also depends on the saved checkpoint weights of the following pre-trained models:

ModelLicense
Stable Diffusion v1-4CreativeML Open RAIL-M License

Any generated texture images are subject to the Creative Commons CC0 1.0 Universal Public Domain Dedication License specified here.

Use of this add-on implies that you agree with all of the terms and conditions mentioned in all of the relevant licenses, which would include whichever model(s) you used to produce the image outputs.