forked from pinks/eris
fix README
This commit is contained in:
parent
6313c5d67e
commit
a251d5e965
|
@ -15,8 +15,8 @@ You can put these in `.env` file or pass them as environment variables.
|
||||||
Required.
|
Required.
|
||||||
- `SD_API_URL` - URL to Stable Diffusion API. Only used on first run. Default:
|
- `SD_API_URL` - URL to Stable Diffusion API. Only used on first run. Default:
|
||||||
`http://127.0.0.1:7860/`
|
`http://127.0.0.1:7860/`
|
||||||
- `TG_ADMIN_USERS` - Comma separated list of usernames of users that can use admin commands. Only
|
- `TG_ADMIN_USERNAMES` - Comma separated list of usernames of users that can use admin commands.
|
||||||
used on first run. Optional.
|
Only used on first run. Optional.
|
||||||
|
|
||||||
## Running
|
## Running
|
||||||
|
|
||||||
|
@ -25,9 +25,9 @@ You can put these in `.env` file or pass them as environment variables.
|
||||||
|
|
||||||
## Codegen
|
## Codegen
|
||||||
|
|
||||||
The Stable Diffusion API in `sd/sdApi.ts` is auto-generated. To regenerate it, first start your SD
|
The Stable Diffusion API in `app/sdApi.ts` is auto-generated. To regenerate it, first start your SD
|
||||||
WebUI with `--nowebui --api`, and then run:
|
WebUI with `--nowebui --api`, and then run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
deno run npm:openapi-typescript http://localhost:7861/openapi.json -o sd/sdApi.ts
|
deno run npm:openapi-typescript http://localhost:7861/openapi.json -o app/sdApi.ts
|
||||||
```
|
```
|
||||||
|
|
|
@ -50,12 +50,18 @@ export async function getConfig(): Promise<Config> {
|
||||||
const configEntry = await db.get<Config>(["config"]);
|
const configEntry = await db.get<Config>(["config"]);
|
||||||
const config = configEntry?.value;
|
const config = configEntry?.value;
|
||||||
return {
|
return {
|
||||||
adminUsernames: config?.adminUsernames ?? [],
|
adminUsernames: config?.adminUsernames ?? Deno.env.get("TG_ADMIN_USERNAMES")?.split(",") ?? [],
|
||||||
pausedReason: config?.pausedReason ?? null,
|
pausedReason: config?.pausedReason ?? null,
|
||||||
maxUserJobs: config?.maxUserJobs ?? Infinity,
|
maxUserJobs: config?.maxUserJobs ?? Infinity,
|
||||||
maxJobs: config?.maxJobs ?? Infinity,
|
maxJobs: config?.maxJobs ?? Infinity,
|
||||||
defaultParams: config?.defaultParams ?? {},
|
defaultParams: config?.defaultParams ?? {},
|
||||||
sdInstances: config?.sdInstances ?? {},
|
sdInstances: config?.sdInstances ??
|
||||||
|
{
|
||||||
|
"local": {
|
||||||
|
api: { url: Deno.env.get("SD_API_URL") ?? "http://127.0.0.1:7860/" },
|
||||||
|
maxResolution: 1024 * 1024,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue