Stable-Diffusion Productivity Scripts
Generate
api-txt2img.py: run generate using text-to-imageapi-img2img.py: run generate using image-to-imageapi-control.py: run generate using control-interfaceapi-faceid.py: run generate using face idapi-pulid.js: run generate using pulidapi-grid.py: run generate using text-to-image
while allowing to vary parameters for x and y to create an image grid
Information
api-progress.py: get progress of a jobapi-info.py: get image metadata
Other API examples
api-upscale.py: run image upscalingapi-detect.py: detect faces in imagesapi-json.py: send json to any api endpointapi-mask.py: run image masking with advanced optionsapi-preprocess.py: run image preprocessingapi-vqa.py: run visual question answeringapi-interrogate.py: interrogate images using clip
- run-benchmark.py: run benchmark tests
JavaScript
api-txt2img.js: run generate using text-to-imageapi-model.js: load model
Helper scripts
validate-locale.py: validate locale fileslcm-convert.py: convert lcm modelsvideo-extract.py: extract frames from video filesinstall-sf.py: install stablefastzluda-python.py: install zluda
Utilities
nvidia-smi.py: get GPU informationimage-grid.py: create image gridimage-exif.py: extract exif data from imagesimage-palette.py: extract color palette from imagesimage-watermark.py: create invisible image watermarkgen-styles.py: generate styles from lines in text filemodel-metadata.py: get model metadata
API Examples
Generate
Text-to-image with all of the possible parameters
Supports upsampling, face restoration and grid creation
python cli/generate.py
By default uses parameters from generate.json
Parameters that are not specified will be randomized:
- Prompt will be dynamically created from template of random samples:
random.json - Sampler/Scheduler will be randomly picked from available ones
- CFG Scale set to 5-10
Utility Scripts
SDAPI
Utility module that handles async communication to Automatic API endpoints
Note: Requires SD API
Can be used to manually execute specific commands:
python sdapi.py progress
python sdapi.py interrupt python sdapi.py shutdown