2023-10-11 02:49:28 +00:00
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
2024-01-13 04:23:06 +00:00
|
|
|
from invokeai.app.invocations.fields import FieldDescriptions
|
2023-10-11 02:49:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
class FreeUConfig(BaseModel):
|
|
|
|
"""
|
|
|
|
Configuration for the FreeU hyperparameters.
|
|
|
|
- https://huggingface.co/docs/diffusers/main/en/using-diffusers/freeu
|
|
|
|
- https://github.com/ChenyangSi/FreeU
|
|
|
|
"""
|
|
|
|
|
|
|
|
s1: float = Field(ge=-1, le=3, description=FieldDescriptions.freeu_s1)
|
|
|
|
s2: float = Field(ge=-1, le=3, description=FieldDescriptions.freeu_s2)
|
|
|
|
b1: float = Field(ge=-1, le=3, description=FieldDescriptions.freeu_b1)
|
|
|
|
b2: float = Field(ge=-1, le=3, description=FieldDescriptions.freeu_b2)
|