fix: allow tile_mode to be set to True or False for backward compatibility

pull/378/head
Bryce 9 months ago committed by Bryce Drennan
parent 3b17d8b3ee
commit f243006236

@ -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

@ -230,7 +230,7 @@ class ImaginePrompt(BaseModel):
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"

Loading…
Cancel
Save