https://github.com/carson-katri/dream-textures Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Changelog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} carson-katri / dream-textures Public * Notifications * Fork 33 * Star 1.3k Stable Diffusion built-in to the Blender shader editor License GPL-3.0 license 1.3k stars 33 forks Star Notifications * Code * Issues 27 * Pull requests 0 * Discussions * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Security * Insights carson-katri/dream-textures This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 5 tags Code * Clone HTTPS GitHub CLI [https://github.com/c] Use Git or checkout with SVN using the web URL. [gh repo clone carson] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @carson-katri carson-katri Bump version ... f182511 Sep 18, 2022 Bump version f182511 Git stats * 32 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time operators Run preload_models.py on macOS Sep 18, 2022 property_groups Add inpainting support Sep 15, 2022 readme_assets Add README Sep 9, 2022 stable_diffusion @ 61f46ca Add requirements-win-torch-1-11-0.txt to fix Windows installs with Py... Sep 17, 2022 .gitignore Initial commit Sep 8, 2022 .gitmodules Add seamless option Sep 11, 2022 LICENSE Add LICENSE Sep 10, 2022 README.md Bump version Sep 18, 2022 __init__.py Bump version Sep 18, 2022 absolute_path.py Refactor addon Sep 10, 2022 async_loop.py Improved UI and basic Windows support Sep 9, 2022 classes.py Add inpainting support Sep 15, 2022 help_section.py Add help section for Windows long file path error Sep 18, 2022 pil_to_image.py Move PIL import into function Sep 11, 2022 preferences.py Add requirements-win-torch-1-11-0.txt to fix Windows installs with Py... Sep 17, 2022 prompt_engineering.py Add show_steps prop to disable step viewing as an optimization Sep 13, 2022 requirements-win-torch-1-11-0.txt Add requirements-win-torch-1-11-0.txt to fix Windows installs with Py... Sep 17, 2022 shader_menu.py Refactor properties into PropertyGroup, and add persistent history Sep 14, 2022 tools.py Add inpainting support Sep 15, 2022 version.py Bump version Sep 18, 2022 View code Dream Textures Installation Usage Init Image Advanced Configuration Compatibility Future Directions README.md Dream Textures Stable Diffusion built-in to the Blender shader editor. * Create textures, concept art, background assets, and more with a simple text prompt * Use the 'Seamless' option to create textures that tile perfectly with no visible seam * Quickly create variations on an existing texture * Experiment with AI image generation * Run the models on your machine to iterate without slowdowns from a service Installation 1. Download the latest version from the Releases tab. 2. Install the addon in Blender's preferences window. 3. Follow the steps in the 'Dream Textures' preferences window to install the necessary dependencies. + Note for Windows users - If you get an error when installing dependencies that looks similar to the one described here, your dependency file paths might be too long (can't be longer than 256 characters). You can solve it by telling Windows to allow long file paths in the registry: 1. Open up the Window registry (Start > Run > regedit) 2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\FileSystem 3. Set LongPathsEnabled to 1 Enter a prompt Generate a unique texture in a few seconds [brick_wall] [brick_wall] [uneven_sto] [uneven_sto] Take an existing texture Modify it with a text prompt [marble] [marble_bri] On Windows, you will need to run Blender as an administrator for the installation to complete successfully. Usage Dream Textures provides most of the configuration options available when using Stable Diffusion directly. 1. Open the Shader editor 2. Select the 'Dream Textures' menu in the far right, and choose the 'Dream Texture' operation. 3. Enter a prompt. There are some presets you can use to automatically fine tune your result: 1. Texture - simply adds the word texture to the end of your prompt to help the model create a texture. 2. Photography - provides many options for specifying a photorealistic result. 3. Custom - passes the prompt directly to SD with no additional keywords. 4. Click 'OK'. Wait a moment for the model to load. After the model loads, the generation runs asynchronously, so you Blender shouldn't completely freeze up. 5. If you have an Image Viewer open, the current progress of the model will appear there with the current step # as the image name (for example, Step 1/25). 6. After the image finishes generating, a new Image Texture node will be added to the open shader editor. The image is packed, so you may want to export it to a separate file. The name of the generated image is the random seed used to create it. If you want to use the same seed, copy the name of the image into the 'Seed' parameter under the 'Advanced' section. Init Image Use an init image to create a variation of an existing texture. [init_image] 1. Enable 'Init Image' 2. Select an image from your filesystem Currently, this doesn't work with packed textures. So select an image from your file system, or export the packed texture to a file and select that. 3. You can change the strength and specify if it should fit to the set size, or keep the original image size. 4. Enter a prompt that tells SD how to modify the image. 5. Click 'OK' and wait for it to finish. Advanced Configuration These options match those of SD. [advanced_c] * Full Precision - more VRAM intensive, but creates better results. Disable this if you have a lower-end graphics card. * Seed - a random seed if set to -1, otherwise it uses the value you input. You can copy the random seed from the generated image's name to use the same seed again. * Iterations - how many images to generate. This doesn't quite work yet, so keep it at 1. * Steps - higher is generally better, but I wouldn't recommend going past 50 until you've refined your prompt. * CFG Scale - essentially how much the model takes your prompt into consideration. 7.5 is a good default for a collaborative experience, but if you want to force the model to follow instructions crank it up to 15-20. * Sampler - KLMS is a good speed/quality default, DDIM is generally faster, and you'll get different results with each so play around with it. Compatibility Dream Textures has been tested with CUDA and Apple Silicon GPUs. If you have an issue with a supported GPU, please create an issue. Future Directions * Other image map types (normal, roughness, displacement, etc.) using a new LDM checkpoint and vocabulary. * AI upscaling and face fixing with ESRGAN and GFPGAN About Stable Diffusion built-in to the Blender shader editor Topics ai blender image-generation blender-addon stable-diffusion Resources Readme License GPL-3.0 license Stars 1.3k stars Watchers 28 watching Forks 33 forks Releases 5 tags Contributors 2 * @carson-katri carson-katri Carson Katri * @gregnr gregnr Greg Richardson Languages * Python 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.