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.
|
||||
- `SD_API_URL` - URL to Stable Diffusion API. Only used on first run. Default:
|
||||
`http://127.0.0.1:7860/`
|
||||
- `TG_ADMIN_USERS` - Comma separated list of usernames of users that can use admin commands. Only
|
||||
used on first run. Optional.
|
||||
- `TG_ADMIN_USERNAMES` - Comma separated list of usernames of users that can use admin commands.
|
||||
Only used on first run. Optional.
|
||||
|
||||
## Running
|
||||
|
||||
|
@ -25,9 +25,9 @@ You can put these in `.env` file or pass them as environment variables.
|
|||
|
||||
## 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:
|
||||
|
||||
```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 config = configEntry?.value;
|
||||
return {
|
||||
adminUsernames: config?.adminUsernames ?? [],
|
||||
adminUsernames: config?.adminUsernames ?? Deno.env.get("TG_ADMIN_USERNAMES")?.split(",") ?? [],
|
||||
pausedReason: config?.pausedReason ?? null,
|
||||
maxUserJobs: config?.maxUserJobs ?? Infinity,
|
||||
maxJobs: config?.maxJobs ?? Infinity,
|
||||
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