From bc6f160044a46b00389c640e2f6563740d4153ea Mon Sep 17 00:00:00 2001 From: db0 Date: Wed, 7 Aug 2024 21:54:03 +0200 Subject: [PATCH 1/2] feat: Prevent mistral models being considered too fast --- horde/classes/kobold/processing_generation.py | 8 +++++++- horde/utils.py | 12 ++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/horde/classes/kobold/processing_generation.py b/horde/classes/kobold/processing_generation.py index 2958e42f..67ee63df 100644 --- a/horde/classes/kobold/processing_generation.py +++ b/horde/classes/kobold/processing_generation.py @@ -112,5 +112,11 @@ def record(self, things_per_sec, kudos): if param_multiplier >= params_count: unreasonable_speed = max_speed_per_multiplier[params_count] break + # This handles the 8x7 and 8x22 models which are generally faster than their size implies. + if "8x" in self.model: + unreasonable_speed = unreasonable_speed * 3 if things_per_sec > unreasonable_speed: - self.worker.report_suspicion(reason=Suspicions.UNREASONABLY_FAST, formats=[things_per_sec]) + self.worker.report_suspicion( + reason=Suspicions.UNREASONABLY_FAST, + formats=[f"{things_per_sec} > {unreasonable_speed}"] + ) diff --git a/horde/utils.py b/horde/utils.py index c9814610..daf2bbc8 100644 --- a/horde/utils.py +++ b/horde/utils.py @@ -48,17 +48,21 @@ def __init__(self, amount, decimals=1): self.prefix = "kilo" self.char = "K" elif self.digits < 10: - self.amount = round(amount / 1000000, self.decimals) + self.amount = round(amount / 1_000_000, self.decimals) self.prefix = "mega" self.char = "M" elif self.digits < 13: - self.amount = round(amount / 1000000000, self.decimals) + self.amount = round(amount / 1_000_000_000, self.decimals) self.prefix = "giga" self.char = "G" - else: - self.amount = round(amount / 1000000000000, self.decimals) + elif self.digits < 16: + self.amount = round(amount / 1_000_000_000_000, self.decimals) self.prefix = "tera" self.char = "T" + else: + self.amount = round(amount / 1_000_000_000_000_000, self.decimals) + self.prefix = "peta" + self.char = "P" def get_db_uuid(): From 35d0fa7deb6356dc71a571ec0250b650106e3fa3 Mon Sep 17 00:00:00 2001 From: db0 Date: Wed, 7 Aug 2024 22:06:48 +0200 Subject: [PATCH 2/2] feat: news --- CHANGELOG.md | 6 ++++- horde/classes/kobold/processing_generation.py | 5 +--- horde/consts.py | 2 +- horde/data/news.json | 27 ++++++++++++++++--- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f8d314d..4f45f9b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -# 4.30.0 +# 4.40.1 + +* Prevents mistral models from being considered suspiciously fast. + +# 4.40.0 * Adds the `active_generations` privileged key on user info providing a list of all non-expired gens the user has active. diff --git a/horde/classes/kobold/processing_generation.py b/horde/classes/kobold/processing_generation.py index 67ee63df..c15713a6 100644 --- a/horde/classes/kobold/processing_generation.py +++ b/horde/classes/kobold/processing_generation.py @@ -116,7 +116,4 @@ def record(self, things_per_sec, kudos): if "8x" in self.model: unreasonable_speed = unreasonable_speed * 3 if things_per_sec > unreasonable_speed: - self.worker.report_suspicion( - reason=Suspicions.UNREASONABLY_FAST, - formats=[f"{things_per_sec} > {unreasonable_speed}"] - ) + self.worker.report_suspicion(reason=Suspicions.UNREASONABLY_FAST, formats=[f"{things_per_sec} > {unreasonable_speed}"]) diff --git a/horde/consts.py b/horde/consts.py index d9dde387..49174a00 100644 --- a/horde/consts.py +++ b/horde/consts.py @@ -1,4 +1,4 @@ -HORDE_VERSION = "4.40.0" +HORDE_VERSION = "4.40.1" WHITELISTED_SERVICE_IPS = { "212.227.227.178", # Turing Bot diff --git a/horde/data/news.json b/horde/data/news.json index 4dae232f..05e1f5ec 100644 --- a/horde/data/news.json +++ b/horde/data/news.json @@ -1,6 +1,20 @@ [ { - "date_published": "2024-05-20", + "date_published": "2024-08-07", + "newspiece": "ArtBot is now an official component of Haidra! You can check the official version at [https://artbot.site](https://artbot.site which is running the latest version of it with a ton of improvements. All kudos to [Rockbandit](https://mastodon.world/@davely)", + "tags": [ + "nlnet", + "rockbandit" + ], + "importance": "Information", + "more_info_urls": [ + "https://artbot.site", + "https://mastodon.world/@davely" + ], + "title": "Official Artbot" + }, + { + "date_published": "2024-07-15", "newspiece": "You can now use the [SD Layer Diffuse tech](https://github.com/layerdiffusion/sd-forge-layerdiffuse) to generate transparent images directly with the AI horde (without the use of a post-processor). To use this functionality, simply pass `transparent: true` in your payloads params. This feature is not supported on Img2Img however.", "tags": [ "db0", @@ -8,8 +22,11 @@ "text2img" ], "importance": "Information", - "more_info_urls": [], - "title": "Generate QR Codes" + "more_info_urls": [ + "https://dbzer0.com/blog/transparent-generations/", + "https://github.com/layerdiffusion/sd-forge-layerdiffuse" + ], + "title": "Images with Transparency" }, { "date_published": "2024-05-20", @@ -20,7 +37,9 @@ "text2img" ], "importance": "Information", - "more_info_urls": [], + "more_info_urls": [ + "https://dbzer0.com/blog/embedded-qr-codes-via-the-ai-horde/" + ], "title": "Generate QR Codes" }, {