Request

Send a POST request to below endpoint.
--request POST 'https://modelslab.com/api/v1/enterprise/load_model_v2' \

ControlNet Model url and model_id table

urlmodel_id
lllyasviel/control_v11p_sd15_inpaintinpaint
lllyasviel/control_v11e_sd15_ip2pip2p
lllyasviel/control_v11f1e_sd15_tiletile
lllyasviel/control_v11e_sd15_shuffleshuffle
lllyasviel/control_v11p_sd15_softedgesoftedge
lllyasviel/control_v11p_sd15_scribblescribble
lllyasviel/control_v11p_sd15_lineartlineart
lllyasviel/control_v11p_sd15_normalbaenormalbae
lllyasviel/control_v11f1p_sd15_depthdepth
lllyasviel/control_v11p_sd15_mlsdmlsd
lllyasviel/control_v11p_sd15_cannycanny

Load a .ckpt or .safetensors Model from Civitai

json
{  
    "key": "enterprise_api_key",  
    "url": "https://civitai.com/api/download/models/94640",  
    "model_id": "majicmix-realistic",  
    "model_category": "stable_diffusion",  
    "model_format": "safetensors",  
    "webhook": "https://modelslab.com",  
    "revision": "fp16"
}

Load a Huggingface Model

json
{  
    "key": "enterprise_api_key",  
    "url": "wavymulder/Analog-Diffusion",  
    "model_id": "analog-diffusion",  
    "model_type": "huggingface",  
    "from_safetensors": "no",  
    "webhook": "https://modelslab.com",  
    "revision": "fp32",  
    "upcast_attention": "no"
}

Load a ControlNet Model

json
{  
    "key": "enterprise_api_key",  
    "url": "lllyasviel/control_v11p_sd15_canny",  
    "model_id": "canny",  
    "model_type": "controlnet",  
    "webhook": "https://modelslab.com",  
    "revision": "fp32",  
    "upcast_attention": "no"
}

BodyAttributes

key
string
required
Your enterprise API Key used for request authorization.
url
string
required
The URL of the Hugging Face model, a .ckpt download link, or a trained model from our Dreambooth API.
model_id
string
required
Unique name (ID) for your model. The model will be saved under this ID and can be referenced later when generating images.
model_category
string
required
The category of the model. Options: lora, stable_diffusion, stable_diffusion_xl, controlnet.
model_format
string
required
The format of the model. Options: ckpt, safetensors, pt, diffusers.
revision
string
default:"fp32"
Precision revision of the model. Options: fp16 or fp32. Default: fp32.
webhook
string
A webhook URL to receive a POST callback when the model load event completes.