Stable Diffusion with Civitai
Use Civitai Model id and Loras. Faster than previous myshell-visual;
Try it in the Widget Center
Click this url to try this widget and copy the Pro Config template.
Usage
Based on your description (text prompt), generate image with various sizes and styles
Input Parameters
Name | Type | Description | Default | Required |
---|---|---|---|---|
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 | |
prompt |
| The text prompt for image generation. Add lora? add < lora:$id:$weight > 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 image generation. | (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 | |
sampler |
| Sampler for diffusion model inference | DPM++ 2M | |
height |
| Height of the generated images | 512 | |
width |
| Width of the generated images | 512 | |
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 | |
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
Detailed Guidelines
Main parameter:
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 version ID from the page.
Example: https://civitai.com/models/10028?modelVersionId=64094 , use
model = 64094
for this model
prompt
The text prompt for image generation.
Add lora?
add
<lora:$id:$weight>
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.
Example:
<lora:426797:1> A young boy is seated on the ground.
Here, we add
lora=426797
with weight 1 for this generation guided by textA young boy is seated on the ground
height & width
The resolution for your generated images.
We recommend to generate 512 * 512 images with SD 1.5 and 1024 * 1024 images with SDXL 1.0
Other functional parameter:
enable_hr
: Enable the post-process high resolution. If it is set to false, please ignore the parameter with prefixhr_
hr_upscaler
: Model for first step super resolution:Choose from
["None", "Lanczos", "Nearest", "ESRGAN_4x", "LDSR", "R-ESRGAN 4x+", "R-ESRGAN 4x+ Anime6B", "ScuNET GAN", "ScuNET PSNR", "SwinIR 4x"]
hr_scale
: Improve the image quality by enlarging it in a way while maintains the original ratios. Default to 2.For example, when
enable_hr=True
andhr_scale=2
, you generated image will be(2*width, 2*height)
If
hr_height
orhr_width
is set to a value other than zero, this parameter will be ignored.
hr_resize_x
andhr_resize_y
: Resize width/height to.0 means not defined. If x set to 0, and y is not 0, we will resize the length of image to y and change width accordingly. Vice versa
For example, when
enable_hr=True
andhr_resize_x=1024
, and you set thewidth=512
to obtain an image with 512 pixels on width. Finally you will get a image with(1024, 1024/512 * height)
hr_second_pass_steps
: Steps of sampling for second pass of diffusion model after hires. Set to 0 means the same steps as first pass.Feel free to use 0 for most cases.
hr_denoising_strength
: Strength of image transfomation during hires transform. High means more influence during second pass sampling after hiresThe weighted sum will be computed based on the images after super-resolution and after the second inference
Set 0.7 for default.
Last updated