Skip to content

Commit

Permalink
Moved FreeU Config Import
Browse files Browse the repository at this point in the history
  • Loading branch information
Millu committed Nov 7, 2023
1 parent 351abd2 commit d573a23
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion invokeai/app/invocations/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

from pydantic import BaseModel, ConfigDict, Field

from invokeai.app.invocations.shared import FreeUConfig
# TODO: Permanent fix for this
# from invokeai.app.invocations.shared import FreeUConfig

from ...backend.model_management import BaseModelType, ModelType, SubModelType
from .baseinvocation import (
Expand All @@ -20,6 +21,18 @@
)


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)

class ModelInfo(BaseModel):
model_name: str = Field(description="Info to load submodel")
base_model: BaseModelType = Field(description="Base model")
Expand Down

0 comments on commit d573a23

Please sign in to comment.