Just like the Automatic 1111 Web UI, Auto 1111 SDK allows you to pass in custom arguments to the SDK. When you initialize a pipeline, you must set the specific arguments/flags you want for that pipeline in the constructor. You can view all the flags that A1111 supports here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings#all-command-line-arguments. These flags become extremely useful when using a float 16 VAE in SDXL (see docs for example). For example, if I wanted to make the generation use medvram, I would do:
from auto1111sdk import StableDiffusionPipelinepipe =StableDiffusionPipeline("model.safetensors", default_command_args ="--medvram")
You can do this for any of the pipelines in Auto 1111 SDK:
from auto1111sdk import StableDiffusionPipeline, EsrganPipeline, RealEsrganPipeline, StableDiffusionXLPipelinepipe =StableDiffusionXLPipeline("model.safetensors", default_command_args ="--medvram")upscaler_1 =EsrganPipeline("upscaler.pth", default_command_args ="<anything flag you want here>")upscaler_1 =RealEsrganPipeline("upscaler2.pth", default_command_args ="<anything flag you want here>")
By default, Auto 1111 SDK sets the following flags: