sketchkit.colorization.controlnet_lineart.ControlNetLineartModel¶
- class sketchkit.colorization.controlnet_lineart.ControlNetLineartModel(device: str = 'cuda', controlnet_model: str = 'ShermanG/ControlNet-Standard-Lineart-for-SDXL', sd_model: str = 'stabilityai/stable-diffusion-xl-base-1.0', vae_model: str = 'madebyollin/sdxl-vae-fp16-fix', torch_dtype: dtype = torch.float16, safety_checker: bool = False, **kwargs: Any)[source]¶
ControlNet model with lineart conditioning for sketch colorization using SDXL.
- pipeline¶
The loaded diffusers pipeline.
- Type:
StableDiffusionXLControlNetPipeline
- device¶
Computation device.
- Type:
str
- __init__(device: str = 'cuda', controlnet_model: str = 'ShermanG/ControlNet-Standard-Lineart-for-SDXL', sd_model: str = 'stabilityai/stable-diffusion-xl-base-1.0', vae_model: str = 'madebyollin/sdxl-vae-fp16-fix', torch_dtype: dtype = torch.float16, safety_checker: bool = False, **kwargs: Any)[source]¶
Initializes the SDXL ControlNet Lineart pipeline.
- Parameters:
device (str) – Hardware device to run the model on. Defaults to “cuda”.
controlnet_model (str) – HuggingFace hub path or local path for the ControlNet.
sd_model (str) – HuggingFace hub path or local path for the base SDXL model.
vae_model (str) – HuggingFace hub path or local path for the VAE model.
torch_dtype (torch.dtype) – PyTorch data type for model weights.
safety_checker (bool) – Whether to enable the NSFW safety checker.
**kwargs (Any) – Additional kwargs passed to diffusers loading methods.
- Raises:
RuntimeError – If model initialization fails.
Methods