philpax / exilent

A Discord bot for Automatic1111's Stable Diffusion web UI
GNU General Public License v3.0
10 stars 1 forks source link

User settings presets #17

Open philpax opened 1 year ago

philpax commented 1 year ago

We already have a database, so we might as well store specific presets and let users pick from them. Quick sketch of table:

CREATE TABLE IF NOT EXISTS presets (
    id                  INTEGER PRIMARY KEY AUTOINCREMENT,
    user_id             TEXT NOT NULL,
    name                TEXT NOT NULL,

    negative_prompt     TEXT,
    width               INTEGER,
    height              INTEGER,
    cfg_scale           REAL,
    steps               INTEGER,
    tiling              INTEGER,
    restore_faces       INTEGER,
    sampler             TEXT,
    model_hash          TEXT,
    denoising_strength  REAL,

    -- img2img specific fields
    resize_mode         TEXT,
) STRICT;

When generating, the user's last generation, a preset (if specified), and parameters are combined to produce the final command.