Model compatibility
When using NTC Sliders make sure you have the correct model selected.
AUTOMATIC1111 stable-diffusion-webui
After installing AUTOMATIC1111 Stable Diffusion WebUI:
- Download NTC Sliders to the correct folder, typically
[base directory]/models/Lora
- In your Lora tab select your desired Slider, you may need to refresh.
- Adjust the value as necessary to achieve your desired effect.
ComfyUI
ComfyUI is a powerful interface for defining custom inference workflows.
The easiest way to use Sliders with ComfyUI is the NTC Sliders ComfyUI Plugin.
Additionally Sliders work with other PEFT and LoRA tools available in ComfyUI, such as the 'Apply LoRA' workflow component.
Diffusers
Using Sliders in diffusers is the same as using any other PEFT or LoRA. Some sample code is below:
import torch
from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
filename = "sdxl.safetensors"
pipe = StableDiffusionXLPipeline.from_single_file(filename, torch_dtype=torch.float16, variant="fp16", use_safetensors=True, local_files_only=True).to("cuda")
pipe.load_lora_weights("sdxl_sad_to_happy.safetensors", weight_name="sdxl_happy.safetensors", adapter_name="happy")
pipe.set_adapters(["happy"], adapter_weights=[1.0]) #smile
# optionally set the scheduler
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
# render a smiling Mona Lisa
prompt = "Mona Lisa"
image = pipe(prompt, denoising_end=1, width=1024, height=1024, guidance_scale=1, num_inference_steps=10).images[0]
External services
Some Slider models are available through Civit AI and HuggingFace
Sliders work with most hosted services. Feel free to contact us if you have questions about other platforms.