Stable Diffusion
@keeb/stable-diffusionv2026.05.26.2
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.
02Models
@keeb/stable-diffusionv2026.05.26.2stable_diffusion.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| pipeline | enum | Diffusers pipeline class. sd15 -> StableDiffusionPipeline, sdxl -> StableDiffusionXLPipeline. |
| modelPath? | string | Optional override: absolute path to a local .safetensors or .ckpt single-file checkpoint. Leave unset to use the checkpoint downloaded by `init`. |
| modelUrl? | string | Optional 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? | string | Optional 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. |
| loraScale | number | LoRA weight (strength). Applied per generate call when loraPath is set. |
| negativePrompt | string | Default negative prompt; can be overridden per generate call. |
| steps | number | |
| cfg | number | |
| width | number | |
| height | number | |
| pythonVersion | string | Python 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.
| Argument | Type | Description |
|---|---|---|
| force | boolean | Re-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.
| Argument | Type | Description |
|---|---|---|
| prompt | string | Prompt to diffuse. |
| seed? | number | Optional seed override. Omit for a random seed. |
| negativePrompt? | string | Per-call override of the default negative prompt. |
| steps? | number | Per-call override of inference steps. |
| cfg? | number | Per-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 Versions
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