ControlNet with Civitai
Stable Diffusion with ControlNet
This widget supports multiple actions. For a more comprehensive understanding of its functionality, we recommend reviewing the following documentation carefully.
You need to pass both the action
and other input parameters of the chosen action to your module_config
Try it in the Widget Center
Click this url to try this widget and copy the Pro Config template.
Usage
Generate Picture with ControlNet
action
txt2img
Input Parameters
Name | Type | Description | Default | Required |
---|---|---|---|---|
action |
| The action of ControlNet, txt2img or img2img | txt2img | |
model |
| The model id from civitai (SD1.5, SDXL 1.0, PlaygroundV2). How to get it? Click on a model page on civitai, and copy the series number within the download link. | 64094 | |
controlnet_model |
| The ControlNet model id from civitai. How to get it? Click on a model page on civitai, and copy the series number within the download link. | 10971 | |
image |
| The input image, can be a url or base64 sting | ||
no_mask |
| Whether to use mask | False | |
mask |
| The correspond mask, can be a url or base64 sting. 1 for mask region | ||
prompt |
| The text prompt for ControlNet. Add lora? add `` to your prompt. `$id` is the series number and `$weight` is the lora weight you want (always set to 1.0). You can use multiple loras. | ||
negative_prompt |
| The negative prompt for ControlNet. | (worst quality, low quality:1.4),(malformed hands:1.4),(poorly drawn hands:1.4),(mutated fingers:1.4),(extra limbs:1.35),(poorly drawn face:1.4),bad leg,strange leg, poor eyes, full screen of face | |
controlnet_module |
| The ControNet module | none | |
guidance_start |
| ControlNet guidance start | 0 | |
guidance_end |
| ControlNet guidance end | 1 | |
control_mode |
| The improved guess mode | Balanced | |
weight |
| The weight of the controlnet model | 1 | |
resize_mode |
| Four modes for output shape calculation: (1) Keep: keep original shape, (2) Certain: based on input width/length (divisible by 32), (3,4) min/max ratio: keep aspect ratio, the resize factor is the min/max of (h/H, w/W). | certain | |
threshold_a |
| The threshold A for controlnet model | 64 | |
threshold_b |
| The threshold B for controlnet model | 64 | |
steps |
| Steps for sampler to step whle sampling | 25 | |
cfg_scale |
| Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results. Default to 7. | 7.0 | |
sampler |
| Sampler for diffusion model inference | DPM++ 2M | |
height |
| Height of the generated images | 512 | |
width |
| Width of the generated images | 512 | |
seed |
| Random seed for generation process. -1 means random seed | -1 | |
clip_skip |
| Early stopping parameter for CLIP model; 1 is stop at last layer as usual, 2 is stop at penultimate layer, etc. | 1 |
Output Parameters
Name | Type | Description | File Type |
---|---|---|---|
url |
| The url of generated image, stored in the cloud. Only temporarily effective, will be cleared in a few hours. |
|
Output Example
Inpaint with ControlNet
action
img2img
Input Parameters
Name | Type | Description | Default | Required |
---|---|---|---|---|
action |
| The action of ControlNet, txt2img or img2img | txt2img | |
model |
| The model id from civitai (SD1.5, SDXL 1.0, PlaygroundV2). How to get it? Click on a model page on civitai, and copy the series number within the download link. | 64094 | |
controlnet_model |
| The ControlNet model id from civitai. How to get it? Click on a model page on civitai, and copy the series number within the download link. | 10971 | |
image |
| The input image, can be a url or base64 sting | ||
no_mask |
| Whether to use mask | False | |
mask |
| The correspond mask, can be a url or base64 sting. 1 for mask region | ||
prompt |
| The text prompt for ControlNet. Add lora? add `` to your prompt. `$id` is the series number and `$weight` is the lora weight you want (always set to 1.0). You can use multiple loras. | ||
negative_prompt |
| The negative prompt for ControlNet. | (worst quality, low quality:1.4),(malformed hands:1.4),(poorly drawn hands:1.4),(mutated fingers:1.4),(extra limbs:1.35),(poorly drawn face:1.4),bad leg,strange leg, poor eyes, full screen of face | |
controlnet_module |
| The ControNet module | none | |
guidance_start |
| ControlNet guidance start | 0 | |
guidance_end |
| ControlNet guidance end | 1 | |
control_mode |
| The improved guess mode | Balanced | |
weight |
| The weight of the controlnet model | 1 | |
resize_mode |
| Four modes for output shape calculation: (1) Keep: keep original shape, (2) Certain: based on input width/length (divisible by 32), (3,4) min/max ratio: keep aspect ratio, the resize factor is the min/max of (h/H, w/W). | certain | |
threshold_a |
| The threshold A for controlnet model | 64 | |
threshold_b |
| The threshold B for controlnet model | 64 | |
steps |
| Steps for sampler to step whle sampling | 25 | |
cfg_scale |
| Classifier Free Guidance Scale - how strongly the image should conform to prompt - lower values produce more creative results. Default to 7. | 7.0 | |
sampler |
| Sampler for diffusion model inference | DPM++ 2M | |
height |
| Height of the generated images | 512 | |
width |
| Width of the generated images | 512 | |
seed |
| Random seed for generation process. -1 means random seed | -1 | |
clip_skip |
| Early stopping parameter for CLIP model; 1 is stop at last layer as usual, 2 is stop at penultimate layer, etc. | 1 | |
mask_blur |
| Mask blur refers to the feathering of a mask (from edges to inside the mask), adjusted between 0-64. A smaller value results in sharper edges. Default to 4 | 4 | |
inpainting_fill |
| Choose the fill content in mask: 0 - fill, 1 - original, 2 - latent noise, 3 - latent nothing | 1 | |
inpainting_mask_invert |
| 0 - Inpaint masked region, 1 - Inpaint not masked region | 0 | |
denoising_strength |
| Strength of image transfomation during inpainting precess. High means more influence during transformation | 0.7 |
Output Parameters
Name | Type | Description | File Type |
---|---|---|---|
url |
| The url of generated image, stored in the cloud. Only temporarily effective, will be cleared in a few hours. |
|
Output Example
Last updated