You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

stability-client

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stability-client - npm Package Compare versions

Comparing version

to
1.9.0

4

build/index.d.ts

@@ -13,4 +13,4 @@ /// <reference types="node" />

seed: number | Array<number>;
width: number;
height: number;
width: number | null;
height: number | null;
diffusion: keyof typeof diffusionMap;

@@ -17,0 +17,0 @@ steps: number;

{
"name": "stability-client",
"version": "1.8.0",
"version": "1.9.0",
"description": "A client for the Stability AI SDK",

@@ -5,0 +5,0 @@ "main": "./build/index.js",

@@ -75,2 +75,34 @@ # stability-client

## Example with a lot of options:
```js
const imgBuffer = Buffer.from(base64ImageRaw, 'base64')
const api = await generate({
prompt: `amazing looking room, Dean Norton style`,
apiKey: process.env.STABLE_DIFFUSION_KEY,
width: 512,
height: 512,
steps: 10,
engine: 'stable-diffusion-512-v2-1',
cfgScale: 10,
noStore: false, // if set to true, it won't save files to outDir after generation.
imagePrompt: {
mime: 'image/png',
content: imgBuffer,
},
samples: 1,
diffusion: 'ddim',
outDir: '/output',
})
api.on('image', async ({ buffer, imagePath }) => {
// upload somewhere probably..
})
api.on('end', (data) => {
console.log('Generating Complete', data)
})
```
## CLI

@@ -96,3 +128,3 @@

-e, --engine <engine> engine to use for inference (default: "stable-diffusion-v1")
--no-store do not write aritfacts to disk
--no-store do not write artifacts to disk
-k, --api-key <api-key> DreamStudio API Key (env: DREAMSTUDIO_API_KEY)

@@ -99,0 +131,0 @@ -o, --output-dir <outputDir> directory to store images (defaults to cwd)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display