Skip to content

Commit

Permalink
update version to 0.2.1
Browse files Browse the repository at this point in the history
add release notes for 0.2.1
  • Loading branch information
chrisrude committed Jul 17, 2023
1 parent 76bba55 commit c5546b1
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ usage: oobabot [-h] [-c CONFIG] [--generate-config] [--invite-url] [--ai-name AI
[--stable-diffusion-url STABLE_DIFFUSION_URL]
[--extra-prompt-text EXTRA_PROMPT_TEXT]
oobabot v0.2.0: Discord bot for oobabooga's text-generation-webui
oobabot v0.2.1: Discord bot for oobabooga's text-generation-webui
General Settings:
Expand Down
71 changes: 71 additions & 0 deletions docs/RELEASE-0.2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

# Release v.0.2.1

## What's Changed

True to the version, his is a small bug-fix release. I had been wanting to get a few more small features in, but a few urgent bugs came up, and I wanted to get them out to users as soon as possible. My priority is to make sure things keep working well first, before adding new features.

## New Contributors

This is the first release to feature pull requests from the community! Thanks to everyone who took the time out to make `oobabot` better!

* @clintkittiesmeow (with help from @jmoney7823956789378) made their first contribution in [PR 61](https://github.com/chrisrude/oobabot/pull/61)
* @harlyh made their first contribution in [PR 66](https://github.com/chrisrude/oobabot/pull/66)

## New Features

* Stable Diffusion Parameters in Prompt by @clintkittiesmeow

A discord user, with your permission, can now customize pretty much any aspect of Stable Diffusion generation within the prompt. For example:

```none
Make me a picture of a cat wearing a hat width=512 height=512 steps=10 seed=10
```

The syntax is just `<param>=<value>` and you can include as many as you want.

A parameter must pass two checks before they are passed to Stable Diffusion:

* It must be included in the new `user_override_params` setting
* It must have a default in the `request_params` dictionary. We use this to know the type of the parameter, and to provide a default value if the user doesn't specify one.

The new yaml setting for `user_override_params` looks like this, and will enable these settings by default:

```yaml
# These parameters can be overridden by the Discord user by including them in their image
# generation request. The format for this is: param_name=value This is a whitelist of
# parameters that can be overridden. They must be simple parameters (strings, numbers,
# booleans), and they must be in the request_params dictionary. The value the user inputs
# will be checked against the type from the request_params dictionary, and if it doesn't
# match, the default value will be used instead. Otherwise, this value will be passed
# through to Stable Diffusion without any changes, so be mindful of what you allow here.
# It could potentially be used to inject malicious values into your SD server. For
# example, steps=1000000 could be bad for your server.
user_override_params:
- cfg_scale
- enable_hr
- model
- negative_prompt
- sampler_name
- seed
- height
- width
```
Thanks to @jmoney7823956789378 and @clintkittiesmeow for the idea and the initial implementation! It would not have happened without you. :)
## Bug Fixes / Tech Improvements
* Fixed the Unicode logging issue in ooba_client.py
A Windows 11 update has reportedly caused an issue with the `--log-all-the-things` parameter. This fix should resolve that issue. Thanks @harlyh for the quick fix.

* Fixed an urgent bug with streaming responses

When using streaming responses, the bot would not be able to see its own messages in the history. This was due to a mistake in how the messages were edited when updates came in. This is now fixed.

* Removed the ai-generated keywords feature, which was never finished and didn't really work right. It would cause issues with the new Stable Diffusion keyword parsing, so it's better to just remove it for now.

### Full Changelog

[All changes from 0.2.0 to 0.2.1](https://github.com/chrisrude/oobabot/compare/v0.2.0...v0.2.1)
45 changes: 30 additions & 15 deletions docs/config.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# "config.yml" from the current directory when it is run.
#

version: 0.2.0
version: 0.2.1

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# persona
Expand Down Expand Up @@ -44,7 +44,7 @@ discord:

# Token to log into Discord with. For security purposes it's strongly recommended that
# you set this via the DISCORD_TOKEN environment variable instead, if possible.
discord_token:
discord_token: ''

# Post the entire response as a single message, rather than splitting it into separate
# messages by sentence.
Expand Down Expand Up @@ -87,12 +87,11 @@ discord:
# default: 0.7
stream_responses_speed_limit:

# FEATURE PREVIEW: Adds a limit to the number of channels the bot will post unsolicited
# messages in at the same time. This is to prevent the bot from being too noisy in large
# servers. When set, only the most recent N channels the bot has been summoned in will
# have a chance of receiving an unsolicited message. The bot will still respond to
# @-mentions and wake words in any channel it can access. Set to 0 to disable this
# feature.
# Adds a limit to the number of channels the bot will post unsolicited messages in at the
# same time. This is to prevent the bot from being too noisy in large servers. When set,
# only the most recent N channels the bot has been summoned in will have a chance of
# receiving an unsolicited message. The bot will still respond to @-mentions and wake
# words in any channel it can access. Set to 0 to disable this feature.
# default: 3
unsolicited_channel_cap:

Expand Down Expand Up @@ -183,21 +182,37 @@ stable_diffusion:
# Feel free to add additional simple parameters here as Stable Diffusion's API evolves.
# See Stable Diffusion's documentation for what these parameters mean.
request_params:
cfg_scale: 7
do_not_save_samples: true
do_not_save_grid: true
enable_hr: false
model: ''
negative_prompt: animal harm, suicide, loli, nsfw
negative_prompt_nsfw: animal harm, suicide, loli
sampler_name: ''
seed: -1
steps: 30
width: 512
height: 512
sampler: ''

# FEATURE PREVIEW: If set, the bot will ask Oobabooga to generate image keywords from a
# user's message. It will then pass the keywords that Oobabooga produces to Stable
# Diffusion to finally generate an image. Otherwise, the bot will simply extract keywords
# directly from the user's message using a simple regex.
# default: False
use_ai_generated_keywords:
# These parameters can be overridden by the Discord user by including them in their image
# generation request. The format for this is: param_name=value This is a whitelist of
# parameters that can be overridden. They must be simple parameters (strings, numbers,
# booleans), and they must be in the request_params dictionary. The value the user inputs
# will be checked against the type from the request_params dictionary, and if it doesn't
# match, the default value will be used instead. Otherwise, this value will be passed
# through to Stable Diffusion without any changes, so be mindful of what you allow here.
# It could potentially be used to inject malicious values into your SD server. For
# example, steps=1000000 could be bad for your server.
user_override_params:
- cfg_scale
- enable_hr
- model
- negative_prompt
- sampler_name
- seed
- height
- width

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# template
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "oobabot"
version = "0.2.0"
version = "0.2.1"
description = "A Discord bot which talks to Large Language Model AIs running on oobabooga's text-generation-webui"
authors = ["Christopher Rude <chris@rudesoftware.net>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/oobabot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"""

# todo: sync this up automatically
__version__ = "0.2.0"
__version__ = "0.2.1"

0 comments on commit c5546b1

Please sign in to comment.