Giter VIP home page Giter VIP logo

blender-controlnet's Introduction

Blender-ControlNet

A quick demo script for you using ControlNet without leaving Blender.

Required

Usage

For now, it's just a quick and hardcoded script.

0. Start A1111 in API mode.

You have to install the Mikubill/sd-webui-controlnet extension in A1111 and download the ControlNet models first, please refer to the installation instructions from Mikubill/sd-webui-controlnet.

Notes

  • In new version of Mikubill/sd-webui-controlnet, you need to enable Allow other script to control this extension in settings for API access.

1. Copy and paste the demo.py code into your blender Scripting pane.

2. Below is the default params, tweak as you like.

DEFAULT_PARAMS = {
    "prompt": "...",
    "negative_prompt": "...",
    "width": 512,
    "height": 512,
    "seed": -1,
    "subseed": -1,
    "subseed_strength": 0,
    "batch_size": 1,
    "n_iter": 1,
    "steps": 20,
    "cfg_scale": 7,
    "restore_faces": False,
    "sampler_index": "DPM++ 2M Karras",
    "controlnet_module": "depth",
    "controlnet_model": "diff_control_sd15_depth_fp16 [978ef0a1]", 
    "controlnet_guidance": 1.0,
    "enable_hr": False,
    "denoising_strength": 0.5,
    "hr_scale": 2,
    "hr_upscale": "Latent (bicubic antialiased)",
}

and don't forget to modify the image saving folder.

IMAGE_FOLDER = "F:\\PATH\\DOESNT\\EXIST\\YET"

Notes

  • Make sure you have the right name for controlnet_model, hash does matter. You can get your local installed ControlNet models list from here.

3. Hit "Run Script"

4. Hit F12, wait for it...

Roadmap

  • Blender addon

blender-controlnet's People

Contributors

coolzilj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.