import * as stableDiffusionClient from "https://deno.land/x/stable_diffusion_client@0.0.3/mod.ts";
Use stable-diffusion-webui from deno
SDHelper contains refactored simple call, SDHelper.client
give access to all stable-diffusion-webui API
import { SDHelper } from 'https://deno.land/x/stable_diffusion_client/mod.ts';
import { * as pc } from 'https://deno.land/std@0.167.0/fmt/colors.ts';
const helper = new SDHelper('http://127.0.0.1:7860');
const { selected, list } = await helper.getModels();
console.log(`${list.length} Model available, Selected model is: ${helper.model_name}`);
Do not forget to enable API access by adding
--api
toCOMMANDLINE_ARGS
variable, and--server-name=0.0.0.0
to allow external access
Interfaces
ArtistItem | |
Body_login_login__post | |
Body_login_login_post | |
Estimation | |
ExtrasBatchImagesRequest | |
ExtrasBatchImagesResponse | |
ExtrasSingleImageRequest | |
ExtrasSingleImageResponse | |
FaceRestorerItem | |
FileData | |
Flags | |
HTTPValidationError | |
HypernetworkItem | |
ImageToImageResponse | |
InterrogateRequest | |
Options | |
PNGInfoRequest | |
PNGInfoResponse | |
PredictBody | |
ProgressResponse | |
PromptStyleItem | |
RealesrganItem | |
ResetBody | |
SamplerItem | |
SDModelItem | |
StableDiffusionProcessingImg2Img | |
StableDiffusionProcessingTxt2Img | |
TextToImageResponse | |
UpscalerItem | |
ValidationError |