Sdwebuitools

by Derek Wang in Addons


Blender operator functions:

Close SDWebUI: Close SDWebUI.

Connect SDWebUI: Connect SDWebUI.

txt2img: It allows users to generate images from a text prompt. Essentially, it is a text-to-image generation tool that enables you to create visual representations based on descriptive text input.

Random seed: Set seed to -1, which will cause a new random number to be used every time.

Fixed seed: Reuse seed from last generation, mostly useful if it was randomized.

img2img: It allows users to use an existing image as input to generate a new, transformed image. This mode of image generation applies AI-based transformations to the provided image while following user-specified parameters and prompts.

Add/Reomve lora: Add or remove lora and its weight.

batchimg2img: Batch creating images from images.

Extras batch process: Batch upscale all the images.

Interrogate CLIP: Interrogate CLIP/DeeBooru-use CLIP/DeeBooru neural network to create a text describing the image, and put it into the prompt field.

Compositing Render: Using Compositing to render depth image for controlnet depth input image, and render result as canny input image.

Link material to objects: It uses Project from View to share materials across selected objects through, which allows to create UV maps for 3D models based on a specific camera view. This method projects the 3D model's geometry onto a 2D plane as seen from the current camera or viewport view.

Add image texture to objects: Add image texture to selected objects.

Save workflow: Save stable diffusion workflows into json file and can be reused by different PCs.

Load workflow: Load SD predefined workflows.

Remove workflow: Remove workflow file from the installation directory.

Addon fields definitions:

1. txt2img properties explanations:

SD checkpoint: Which Stable Diffusion model to use? The addon supports managing and switching between different AI models and checkpoints, providing flexibility and access to different styles and versions of the Stable Diffusion model.

Prompt: To guide the image generation process.

Negative Prompt: To avoid certain elements in the image.

Sampler: Which algorithm to use to produce the image?

Sampling steps: How many times to improve the generated image iteratively; higher values take longer; very low values can produce bad results?

Hires.fix: Use a two step process to partially create an image at smaller resolution, upsclae, and then improve details in it without changing composition.

Denoising Strength: Determines how little respect the algorithm should have for image's content. At 0, nothing will change, and at 1 you'll get an unrelated image. With values below 1.0, processing will take less steps than the Sampling Steps specifies.

Upscaler: Upscaler refers to the neural network model used for image upscaling. These upscalers are deep learning models trained to enhance the resolution and quality of low-resolution images. 

Upscale by: Adjusts the size of the image by multiplying the original width and height by the selected value. Ignored if either Resize witdth to or Resize height to are non-zero.

Hires steps: Number of sampling steps for upscaled picture. If 0, uses same as for original.

Resize width to: Resizes images to this width. If 0, width is inferred from either of two nearby sliders.

Resize height to: Resizes images to this height. If 0, height is inferred from either of two nearby sliders.

Batch size: How many images to create in a single batch(increases generation performance at cost of higher VRAM usage?

Batch count: How many batches of images to create(has no impact on generation performance or VRAM usage?

CFG Scale: Classifier Free Guidance Sacle -  how strongly the image should conform to prompt - lower values produce more creative results.

Width: The width of the output images, in pixels(must be a multiple of 64).

Height: The height of the output images, in pixels(must be a multiple of 64).

Lora: LoRA typically refers to Loose Resolution Augmentation. LoRA is a technique used in image upscaling to enhance the resolution and quality of images by leveraging a combination of high-resolution and low-resolution data during the training process of neural network models.

Lora weight: LoRA weight controls the relative influence or importance of the high-resolution and low-resolution components in the training process of neural network models.

Extra: Enable variation seed.

seed: A value that determines the ouput of random number generator - if you create an image with same paramters and seed as another image, you'll get the same result. 

Variation seed: Seed of a different picture to be mixed into the generation.

Variation strength: How strong of a variation to produce. At 0, there will be no effect. At 1, you will get the complete picture with variation seed(except for ancestral samplers, where you will just get something.

Resize seed from width: Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution.

Resize seed from height: Make an attempt to produce a picture similar to what would have been produced with same seed at specified resolution.

Cube projection: If enabled, unwrap uv by cube projection.

ADetailer: ADetailer by face by default.

by hand: ADetailer by hand also.

Collection: Input collection name or select selection in Outliner.

Link type: link material by below types: all objects/selected collection/selected objects/selected armature.

Denominator: Define the number of elements you want to divide the resolution by denominator to get the total number for detecting mesh object faces. For example, if resolution X/Y is 1920/1080 and denominator is 0.5, the number of elements will be 1920/1080/0.5=3840/2160. We will divide the v3d area by 3840/2160 pieces to detect the mesh faces.

predefined setting: load predefined controlnet settings.

Image name for adding into material: the latest render result file name for adding into material image texture, image file can be changed to what you want to add into material.

ContrlNet unit number: Multi-ControlNet: ControlNet unit number at maximum 3 controlNet units.


2. Contolnet properties explanations:

Unit number: Multi-ControlNet: ControlNet unit number.

Enable controlnet: Enable the current ControlNet.

Image Directory: Path to setup controlnet image.

Low VRAM: It typically refers to situations where the available Video RAM (VRAM) on the GPU is insufficient for performing certain tasks efficiently or at all. 

Pixel Perfect: It refers to the ability of the model to generate high-quality, visually realistic images at the pixel level. This means that the generated images closely resemble the ground truth images or the input images, with minimal artifacts, distortions, or discrepancies at the pixel level.

Control type: It refers to the method or mechanism used to manipulate the latent space or guide the generation process of the diffusion model. The control net is a component of the model architecture that enables users to influence the output by specifying certain attributes or characteristics they want to control in the generated samples.

Preprocessor: The preprocessor of a control type refers to the component or mechanism responsible for preprocessing the control inputs before they are used to manipulate the generation process of the diffusion model. The preprocessor acts as an interface between the control inputs and the model, transforming the raw input data into a format that can be effectively utilized to guide the generation process.

Model: The model of a control type refers to the specific architecture or structure used to implement the control mechanism within the diffusion model. The model of a control type defines how the control inputs are integrated into the generation process to influence the characteristics of the generated samples.

Control Weight: It refers to a parameter or coefficient used to determine the influence or importance of the control inputs on the generation process. It quantifies the degree to which the control net or additional conditioning information affects the characteristics or attributes of the generated samples. A higher control weight increases the influence of the control inputs, resulting in more pronounced modifications or manipulations of the generated samples based on the specified control information. Conversely, a lower control weight reduces the impact of the control inputs, leading to samples that closely resemble the input data with minimal modification.

Preprocessor Resolution: Preprocessor Resolution.

Starting Control Step: Default is 0.0. Starting Control Step.

Ending Control Step: Default is 1.0. Ending Control Step.

Control Mode: Balanced\My prompt is more important\ControlNet is more important. It refers to the configuration or setting used to prioritize either the prompt provided by the user ("My prompt is more important") or the control net ("ControlNet is more important") during the generation process. This setting determines the degree to which the diffusion model relies on the user's prompt or the control net to guide the generation of samples.

Prompt-Prioritized Control Mode ("My prompt is more important"): In this mode, the diffusion model gives greater importance to the prompt provided by the user when generating samples. The model focuses on interpreting and incorporating the user's input into the generation process, ensuring that the generated samples closely align with the user's specified intentions or directions. This mode is suitable for tasks where the user's prompt contains crucial information or preferences that should be reflected in the generated outputs.

ControlNet-Prioritized Control Mode ("ControlNet is more important"): Conversely, in this mode, the diffusion model prioritizes the information provided by the control net when generating samples. The model relies heavily on the control net to guide the generation process, leveraging the learned representations and attributes encoded in the control net to produce samples that align with the desired characteristics or features specified by the control net. This mode is suitable for tasks where the control net has been trained to capture relevant attributes or patterns that should be emphasized in the generated outputs.

Resize Mode: Just Resize, Crop and Resize, Resize and Fill. It refers to the specific approach or method used to resize input images or data before they are processed by the diffusion model. The resize mode determines how the input data is transformed to match the required dimensions or aspect ratios of the model's input layer. 

Just Resize: In this mode, the input images or data are resized directly to match the dimensions specified by the model's input layer. This mode does not alter the aspect ratio of the input data, and any excess or insufficient pixels are either added or removed during the resizing process. The resulting images or data may exhibit distortion or stretching if the aspect ratio of the input data does not match that of the model's input layer.

Crop and Resize: In this mode, the input images or data are first cropped to match the aspect ratio of the model's input layer, and then resized to the required dimensions. Cropping ensures that the input data maintains its original aspect ratio while eliminating any excess or irrelevant regions that fall outside the model's input layer. The cropped regions are typically chosen to preserve the most relevant information or features of the input data.

Resize and Fill: In this mode, the input images or data are resized to match the dimensions specified by the model's input layer, and any regions that are not covered by the resized input data are filled with additional pixels or values. This mode ensures that the entire input layer of the model is fully covered by the input data, even if the aspect ratio of the input data does not match that of the model's input layer. However, filling the uncovered regions may introduce artifacts or inconsistencies in the input data.

Last render: The latest render result image will act as input image for the current ControlNet.

From depth: The latest depth image saved from Compositing will act as input image for the current ControlNet.


3. img2img properties explanations:

Image Directory: Path to setup img2img image.

Sort by: By File name or File date. It will also apply to image settings in ControlNet.

Reverse: Sort the images in reverse. It will also apply to image settings in ControlNet.

Img Num: Image number to show. It will also apply to image settings in ControlNet.

Last render: The latest render result image will act as input image for the current ControlNet.

By mask: Inpaint by mask refers to a technique used for image inpainting, a process of filling in missing or damaged regions of an image based on surrounding information or a specified mask.

Original size: Output sd image by original image size.

Resize by: Resize by original input image size.

Batch output: Enale batch output.

Resize mode: It refers to the method used to adjust the dimensions of images during the generation process. 

Just Resize: This mode simply resizes the input image to the specified dimensions without any additional adjustments. It maintains the original aspect ratio of the image while resizing, which may result in empty space or distortion if the target dimensions do not match the original aspect ratio.

Crop and Resize: In this mode, the input image is first cropped to match the target aspect ratio, and then resized to the specified dimensions. The cropping operation ensures that the entire target area is filled with relevant content from the input image, minimizing empty space or distortion. 

Resize and Fill: This mode resizes the input image to fit within the specified dimensions while preserving its original aspect ratio. If the input image's aspect ratio does not match the target dimensions, the resized image is centered within the target area, and any empty space is filled with background color or content.

Just Resize (Latent Upscale): Similar to Just Resize, this mode resizes the input image to the specified dimensions without any additional adjustments. However, it also incorporates latent upscaling techniques during the generation process, which may result in improved image quality or resolution compared to standard resizing methods.

Mask blur: How much to blur the mask before processing, in pixels.

Mask mode: It refers to the technique used for inpainting, which is the process of filling in missing or damaged regions of an image based on surrounding information or a specified mask. The mode determines whether the inpainting process considers a mask indicating the areas to be filled.

Mask content: What to put inside the masked area before processing it with Stable Diffusion.

Inpaint area: It refers to the region of the input image that undergoes the inpainting process, which involves filling in missing or damaged areas based on surrounding information or a specified mask. The inpaint area option determines the scope of the inpainting operation and specifies which parts of the input image should be considered for inpainting.

Only masked padding, pixels: It refers to the padding applied to the inpainted area when performing inpainting at full resolution. This parameter controls the extent to which the inpainted region extends beyond its original boundaries, providing additional context for the inpainting process.


4. Interrogate CLIP/DeepBooru

By DeepBooru: If by True, will interrogate DeepBooru. If by False, will interrogate CLIP.

Overlay prompts: If by True, will overlay the newly generated prompt at the end of the current prompt. If by False, will replace the current prompt with the newly generated one.


5. Workflows configuration:

Workflow: Predefined workflows for stable diffusion configuration.

Saved workflow name: Input stable diffusion workflow name.

txt2img workflow: To save txt2img workflow settings.

img2img workflow: To save img2img workflow settings.

controlnet workflow: To save controlnet workflow settings.


Published about 1 month ago
Blender Version 4.1
License Mit
Have questions before purchasing?

Contact the Creator with your questions right now.

Login to Message