Skip to content
nguyenvuducthuy edited this page Apr 4, 2023 · 13 revisions

B2SD

A blender 3 Stable Diffusion depot

Install:

  1. Opne window cmd and install rembg, the tool still run without it but you cannot use rembg feature

     Path\to\blender\3.4\python\bin\python.exe -m pip install rembg
    
  2. Install pillow module good to have but the tool still run without it

     Path\to\blender\3.4\python\bin\python.exe -m pip install Pillow
    
  3. Run blender and install addon from https://github.com/nguyenvuducthuy/thuy_b2sd/releases

  4. Basic params

     isRenAnim : bool
         set it true when you want to render seq
     sd_isImg2img : bool
         set it true when you want to use img2img
     sd_base_image : str
         a base image for imag2img cmd
     sd_prompt : str
         sd prompt
     sd_negative_prompt : str
         sd negative prompt
     sd_seed : int
         sd seed
     sd_root_out_path : str
         output folder
     sd_isrembg : bool
         remove bg in sd output img
     sd_args : string
         some parameters from stable diffusion webui
         ex:
             Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 88888, Size: 512x512, Model hash: 0b9c8fd3a8, Model: macaronMix_v10, Denoising strength: 0.75
    
  5. Add blender collection into render_collection parameter in order to render control net image

image

  1. Make sure you have a render layer that has same name with control net model like in this image below

image

  1. Add a segmentation tool, select a mesh and choose a name in ui list and hit segmenting button

image

color will be drawn in vertex color so you need to set a material like this to render correct

image

Clone this wiki locally