Skip to main content

Stable Diffusion

@keeb/stable-diffusionv2026.05.26.2· 4d agoMODELS
01README

txt2img via diffusers for SD1.5 and SDXL single-file checkpoints. A seamless init downloads a public base checkpoint (no auth) so a pulled instance works with zero local setup.

02Models1
@keeb/stable-diffusionv2026.05.26.2stable_diffusion.ts

Global Arguments

ArgumentTypeDescription
pipelineenumDiffusers pipeline class. sd15 -> StableDiffusionPipeline, sdxl -> StableDiffusionXLPipeline.
modelPath?stringOptional override: absolute path to a local .safetensors or .ckpt single-file checkpoint. Leave unset to use the checkpoint downloaded by `init`.
modelUrl?stringOptional override of the base-model download URL used by `init`. No authentication is sent; the URL must be publicly accessible. Defaults to the pipeline's Stability AI base checkpoint.
loraPath?stringOptional absolute path to a LoRA .safetensors applied on top of the base checkpoint. Must match the base pipeline (e.g. an SDXL LoRA with an SDXL checkpoint). Remember the LoRA's trigger words still have to appear in the prompt.
loraScalenumberLoRA weight (strength). Applied per generate call when loraPath is set.
negativePromptstringDefault negative prompt; can be overridden per generate call.
stepsnumber
cfgnumber
widthnumber
heightnumber
pythonVersionstringPython interpreter version uv should use (must match the script's PEP 723 requires-python range).
fn init(force: boolean)
Download the base checkpoint for this pipeline (public, no auth) into the per-instance cache and record its location. Idempotent: skips re-download if the file already exists unless force=true.
ArgumentTypeDescription
forcebooleanRe-download even if the checkpoint already exists in the cache.
fn generate(prompt: string, seed?: number, negativePrompt?: string, steps?: number, cfg?: number, width?: number, height?: number)
Run txt2img with the instance defaults. Pass --input prompt=... at runtime. Requires either a modelPath override or a prior `init` run.
ArgumentTypeDescription
promptstringPrompt to diffuse.
seed?numberOptional seed override. Omit for a random seed.
negativePrompt?stringPer-call override of the default negative prompt.
steps?numberPer-call override of inference steps.
cfg?numberPer-call override of guidance scale.
width?number
height?number

Resources

result(infinite)— Per-generation metadata (seed, params, image path).
checkpoint(infinite)— Location and provenance of the checkpoint downloaded by init.

Files

image(image/png)— Generated PNG image.
03Previous Versions1
2026.05.26.1May 27, 2026
04Stats
B
85 / 100
Downloads
0
Archive size
11.5 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository0/2missing
05Platforms
06Labels