mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Moved FreeU Config Import
This commit is contained in:
parent
351abd2ca2
commit
d573a23090
@ -3,7 +3,8 @@ from typing import List, Optional
|
|||||||
|
|
||||||
from pydantic import BaseModel, ConfigDict, Field
|
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 ...backend.model_management import BaseModelType, ModelType, SubModelType
|
||||||
from .baseinvocation import (
|
from .baseinvocation import (
|
||||||
@ -20,6 +21,18 @@ from .baseinvocation import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
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):
|
class ModelInfo(BaseModel):
|
||||||
model_name: str = Field(description="Info to load submodel")
|
model_name: str = Field(description="Info to load submodel")
|
||||||
base_model: BaseModelType = Field(description="Base model")
|
base_model: BaseModelType = Field(description="Base model")
|
||||||
|
Loading…
Reference in New Issue
Block a user