Skip to content

Latest commit

 

History

History
245 lines (241 loc) · 15.3 KB

config.md

File metadata and controls

245 lines (241 loc) · 15.3 KB

Configuration

Here you can see an explanation of what which option does

{
    "use_database": Set to false if you do not want to use a database *6,
    "default_token": The default token to use for requests if user is not logged in (STRING; recommended default: "0000000000"),
    "apply_roles_to_worker_owners": Roles to apply if the user has a worker running (ARRAY OF ROLE IDS),
    "apply_roles_to_trusted_users": Roles to apply if the useris trusted (ARRAY OF ROLE IDS),
    "advanced": {
        "dev": Whether this instance is for development or not (BOOLEAN) *4,
        "encrypt_token": Encrypt the users token before saving in the database (BOOLEAN) *9,
        "result_structure_v2_enabled": Shows a new message as the result for generate and advanced generate (BOOLEAN)
    },
    "filter_actions": {
        "mode": The mode on how the guilds list should act ('whitelist' or 'blacklist'),
        "guilds": The list of guilds to apply the filters to (ARRAY OF GUILD IDS),
        "apply_filter_to": {
            "react_to_transfer": Whether to apply the filter to this action (BOOLEAN),
            "apply_roles_to_worker_owners": Whether to apply the filter to this action (BOOLEAN),
            "apply_roles_to_trusted_users": Whether to apply the filter to this action (BOOLEAN)
        }
    },
    "react_to_transfer": {
        "enabled": Whether transferring kudos by reacting is enabled (BOOLEAN),
        "emojis": [
            {
                "id": The ID of the Emoji (STRING),
                "amount": The amount to transfer when reacted (NUMBER),
                "title": The title of the emoji transfer (STRING) (OPTIONAL),
                "message": The message of the emoji transfer (STRING) (OPTIONAL)
            }
        ],
        "emojis" can be an infinitely long list with emojis, if there are duplicate emoji ids always the first will get used
        "allow_delayed_claim": When set to true the transaction is done as soon as the targeted user is logged in
    },
    "logs": {
        "enabled": Whether logging in files are enabled (BOOLEAN),
        "directory": Which directory to create the logs in (STRING; default: "/logs"),
        "plain": Set to true if you want to have logs in the form of a .TXT file (BOOLEAN),
        "csv": Set to true if you want to have logs in the form of a .CSV file (BOOLEAN),
        "log_actions": {
            "without_source_image": Set to true if you want to log generations without image to image (BOOLEAN),
            "with_source_image": Set to true if you want to log generations with image to image (BOOLEAN)
        }
    },
    "interrogate": {
        "enabled": Whether the interrogate command is enabled (BOOLEAN),
        "update_interrogation_status_interval_seconds": The interval at which the embed in Discord gets updated (INTEGER),
        "enable_user_captioning" Whether users can use the context command to caption other users profile pictures (BOOLEAN),
        "enable_image_description_context": Whether users can use the context command to create descriptions for images other users sent (BOOLEAN),
        "default": {
            "nsfw": If no choice is given interrogate if image is nsfw (BOOLEAN) *1,
            "caption": If no choice is given create a caption for the image (BOOLEAN) *1,
            "interrogation": If no choice is given interrogate the image (BOOLEAN) *1,
        },
        "user_restrictions": {
            "allow_nsfw": Allow users to interrogate for nsfw (BOOLEAN),
            "allow_caption": Allow users to create a caption (BOOLEAN),
            "allow_interrogation": Allow users to get an interrogation result (BOOLEAN)
        }
    },
    "advanced_generate": {
        "enabled": Whether the generate command is enabled (BOOLEAN),
        "require_login": Set to true if you want the user to log in with their ai horde token (BOOLEAN),
        "trusted_workers": Whether to only use trusted workers (BOOLEAN) *1,
        "censor_nsfw": Whether to censor NSFW images if they were generated by accident (BOOLEAN) *1,
        "replacement_filter": If enabled, suspicious prompts are sanitized through a string replacement filter instead. *1,
        "blacklisted_models": A list of blacklisted models which users are not allowed to use (ARRAY OF STRING),
        "blacklisted_words": A list of blacklisted words which users are not allowed to use (ARRAY OF STRING),
        "blacklist_regex": A regex version of blacklisted_words, allows blacklisting negative and positive prompt (check for ###) and multiple words together (STRING),
        "update_generation_status_interval_seconds": The interval at which the embed in Discord gets updated (INTEGER),
        "convert_a1111_weight_to_horde_weight": Whether to convert a1111 to weighted prompt required by the api (BOOLEAN) *7 *8,
        "improve_loading_time": Try to improve the displaying time between generation finished and generation displayed in discord (BOOLEAN) *7
        "default": {
            "tiling": Whether the result should be tileable if nothing is specified (BOOLEAN) *1,
            "steps": How many steps to go through by default if nothing is specified (INTEGER) *1,
            "resolution": {
                "width": The default outputs width (INTEGER) *1,
                "height": The default outputs height (INTEGER) *1
            },
            "amount": The default amount of images to generate (INTEGER) *1,
            "cfg": The cfg value to use for generation (INTEGER) *1,
            "clip_skip": The clip_skip value to use for generation (INTEGER) *1,
            "sampler": The default sampler to use (STRING) *1 *2,
            "model": The default model to use for generation (STRING) *1 *3,
            "denoise": The default denoise strength to use in % (NUMBER; 0-100) *1,
            "gfpgan": The default for gfpgan (BOOLEAN) *1,
            "real_esrgan:" The default for real_esrgan (BOOLEAN) *1,
            "karras:" The default for karras (BOOLEAN) *1,
            "share:" The default for sharing the result (BOOLEAN) *1,
        },
        "source_image": {
            "require_login": Whether the user has to be logged in to use image to image (BOOLEAN),
            "require_ai_horde_account_oauth_connection": Whether the user has to have a ai horde account with an oauth connection (e.g. Discord) (BOOLEAN),
            "allow_non_webp": Whether to allow other image formats other than webp (BOOLEAN),
            "require_nsfw_channel": Set to true if the channel the command is used in has to be marked as age restricted (BOOLEAN),
            "whitelist": {
                "only_allow_whitelist": Whether only users in the whitelist can use image to image (BOOLEAN),
                "user_ids": List of users ids who are whitelisted (ARRAY OF DISCORD USER IDS),
                "bypass_checks": Set to true if whitelisted users should bypass the restrictions above (BOOLEAN)
            }
        },
        "user_restrictions": {
            "width": {
                "min": The minimum width the user can input into the /generate command (INTEGER; DEFAULT: 64),
                "max": The maximum width the user can input into the /generate command (INTEGER; DEFAULT: 1024)
            },
            "height": {
                "min": The minimum height the user can input into the /generate command (INTEGER; DEFAULT: 64),
                "max": The maximum height the user can input into the /generate command (INTEGER; DEFAULT: 1024)
            },
            "amount": {
                "max": The maximum amount of images a user can generate (INTEGER; DEFAULT: 1)
            },
            "steps": {
                "min": The minimum steps the user can input into the /generate command (INTEGER; DEFAULT: 1),
                "max": The maximum steps the user can input into the /generate command (INTEGER; DEFAULT: 100)
            },
            "cfg": {
                "min": The minimum cfg the user can input into the /generate command (INTEGER; DEFAULT: 1),
                "max": The maximum cfg the user can input into the /generate command (INTEGER; DEFAULT: 100)
            },
            "denoise": {
                "min": The minimum denoising strength the user can input into the /generate command (INTEGER; DEFAULT: 0),
                "max": The maximum denoising strength the user can input into the /generate command (INTEGER; DEFAULT: 100)
            },
            "allow_sampler": (BOOLEAN) *5
            "allow_cfg": (BOOLEAN) *5,
            "allow_clip_skip": (BOOLEAN) *5,
            "allow_seed": (BOOLEAN) *5,
            "allow_height": (BOOLEAN) *5,
            "allow_width": (BOOLEAN) *5,
            "allow_gfpgan": (BOOLEAN) *1 *5,
            "allow_real_esrgan": (BOOLEAN) *1 *5,
            "allow_seed_variation": (BOOLEAN) *5,
            "allow_tiling": (BOOLEAN) *5,
            "allow_steps": (BOOLEAN) *5,
            "allow_amount": (BOOLEAN) *5,
            "allow_models": (BOOLEAN) *5,
            "allow_source_image": (BOOLEAN) *5,
            "allow_denoise": (BOOLEAN) *5,
            "allow_karras": (BOOLEAN) * 5,
            "allow_nsfw": Set to true if you want to allow NSFW image generation for your users (BOOLEAN),
            "allow_sharing": (BOOLEAN) *5,
            "allow_rating": Allow the user to rate their generated images (BOOLEAN)
        }
    },
    "generate": {
        "enabled": Whether the generate command is enabled (BOOLEAN),
        "require_login": Set to true if you want the user to log in with their ai horde token (BOOLEAN),
        "trusted_workers": Whether to only use trusted workers (BOOLEAN) *1,
        "censor_nsfw": Whether to censor NSFW images if they were generated by accident (BOOLEAN) *1,
        "replacement_filter": If enabled, suspicious prompts are sanitized through a string replacement filter instead. *1,
        "blacklisted_styles": A list of blacklisted styles or categories which users are not allowed to use (ARRAY OF STRING),
        "blacklisted_words": A list of blacklisted words which users are not allowed to use (ARRAY OF STRING),
        "blacklist_regex": A regex version of blacklisted_words, allows blacklisting negative and positive prompt (check for ###) and multiple words together (STRING),
        "update_generation_status_interval_seconds": The interval at which the embed in Discord gets updated (INTEGER),
        "convert_a1111_weight_to_horde_weight": Whether to convert a1111 to weighted prompt required by the api (BOOLEAN) *7 *8,
        "improve_loading_time": Try to improve the displaying time between generation finished and generation displayed in discord (BOOLEAN) *7
        "default": {
            "tiling": Whether the result should be tileable if nothing is specified (BOOLEAN) *1,
            "clip_skip": The clip_skip value to use for generation (INTEGER) *1,
            "share:" The default for sharing the result (BOOLEAN) *1,
            "amount": The default amount of images to generate (INTEGER) *1,
            "style": The name of the style to use as a default (STRING)
        },
        "user_restrictions": {
            "amount": {
                "max": The maximum amount of images a user can generate (INTEGER; DEFAULT: 1)
            },
            
            "allow_negative_prompt": (BOOLEAN) *5,
            "allow_style": (BOOLEAN) *5,
            "allow_tiling": (BOOLEAN) *5,
            "allow_amount": (BOOLEAN) *5,
            "allow_nsfw": Set to true if you want to allow NSFW image generation for your users (BOOLEAN),
            "allow_sharing": (BOOLEAN) *5,
            "allow_rating": Allow the user to rate their generated images (BOOLEAN)
        }
    },
    "remix": {
        "enabled": Whether the remix action is enabled (BOOLEAN),
        "require_login": Set to true if you want the user to log in with their ai horde token (BOOLEAN),
        "trusted_workers": Whether to only use trusted workers (BOOLEAN) *1,
        "blacklisted_words": A list of blacklisted words which users are not allowed to use (ARRAY OF STRING),
        "blacklist_regex": A regex version of blacklisted_words, allows blacklisting negative and positive prompt (check for ###) and multiple words together (STRING),
        "convert_a1111_weight_to_horde_weight": Whether to convert a1111 to weighted prompt required by the api (BOOLEAN) *7 *8,
        "allow_custom_strength": Set to true to allow the user to give a custom strength (BOOLEAN),
        "generation_options": {
            "sampler_name": The sampler to use for remixing (STRING) *1 *2,
            "model": The model to use for remixing (STRING) *1 *3,
            "width": The width of the result (INTEGER) *1,
            "height": The height of the result (INTEGER) *1,
            "allow_nsfw": Set to true if you want to allow NSFW image generation for your users (BOOLEAN),
            "censor_nsfw": Whether to censor NSFW images if they were generated by accident (BOOLEAN) *1,
            "share_result": Whether to share the result or not (BOOLEAN) *1,
            "cfg": The cfg scale to use for remixing (INTEGER) *1,
            "denoise": The denoise strength to use for remixing (INTEGER; between 0 and 100) *1,
            "steps": The steps to use for remixing (INTEGER)
        }
    },
    "party": {
        "enabled": Whether the remix action is enabled (BOOLEAN),
        "mention_roles": The roles to mention when a party is started (ARRAY OF ROLE IDS),
        "default": {
            "recurring": The default for recurring awards (BOOLEAN),
            "pay_for_generations": The default for paying for generations (BOOLEAN)
        },
        "user_restrictions": {
            "award": {
                "min": (BOOLEAN) *5,
                "max": (BOOLEAN) *5,
            },
            "duration": {
                "min": (BOOLEAN) *5,
                "max": (BOOLEAN) *5,
            },
            "wordlist": {
                "min": (BOOLEAN),
                "max": (BOOLEAN),
            }
        }
    },
    "data_sources": {
        "curated_loras_source": The default source where to fetch the curated list of loras with (STRING) *12,
        "styles_source": The default source where to fetch the styles from (STRING) *10,
        "style_categories_source": The default source where to fetch the style categories from (STRING) *11,
    }
}

*1 See API Documentation for reference (https://aihorde.net/api)
*2 Available Samplers: k_lms, k_heun, k_euler, k_euler_a, k_dpm_2, k_dpm_2_a, DDIM, PLMS, k_dpm_fast, k_dpm_adaptive, k_dpmpp_2s_a, k_dpmpp_2m, dpmsolver
*3 Not all models are available at all times *1
*4 Developer mode will enable logging and will also show the generations ID in the embed in Discord
*5 This option changes how the command is created. If set to false the user will not have the option to modify this value when generating or the input they can give is limited.
*6 This option must be set to false, leaving it blank will default it to true
*7 EXPERIMENTAL OPTION, ENABLE AT YOUR OWN RISK
*8 For example (((test))) will be automatically converted to (test:1.3)
*9 Uses an encryption key only known to you to encrypt the users tokens. This is recommended to increase security. Enabling this option may have an impact on speed.
*10 Must follow the scheme of https://github.com/Haidra-Org/Stable-Horde-Styles/blob/main/styles.json
*11 Must follow the scheme of https://github.com/Haidra-Org/Stable-Horde-Styles/blob/main/categories.json
*12 Must follow the scheme of https://github.com/Haidra-Org/AI-Horde-image-model-reference/blob/main/lora.json