From f243006236e0a8d025d138929607755b3cb49b1a Mon Sep 17 00:00:00 2001 From: Bryce Date: Sat, 9 Sep 2023 16:22:19 -0700 Subject: [PATCH] fix: allow tile_mode to be set to True or False for backward compatibility --- README.md | 2 ++ imaginairy/schema.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 208c1bf8..71e02d7e 100644 --- a/README.md +++ b/README.md @@ -493,6 +493,8 @@ A: The AI models are cached in `~/.cache/` (or `HUGGINGFACE_HUB_CACHE`). To dele ## ChangeLog +- fix: allow tile_mode to be set to True or False for backward compatibility + **13.1.0** - feature: *api server now has feature parity with the python API*. View the docs at http://127.0.0.1:8000/docs after running `aimg server` - `ImaginePrompt` is now a pydantic model and can thus be sent over the rest API diff --git a/imaginairy/schema.py b/imaginairy/schema.py index 44a35ece..988e1edf 100644 --- a/imaginairy/schema.py +++ b/imaginairy/schema.py @@ -230,7 +230,7 @@ def validate_negative_prompt(cls, v, values): def validate_prompt_strength(cls, v): return 7.5 if v is None else v - @validator("tile_mode", always=True) + @validator("tile_mode", always=True, pre=True) def validate_tile_mode(cls, v): if v is True: return "xy"