Archived
35 lines
817 B
Python
35 lines
817 B
Python
"""
|
|
Shared type definitions for workflows.
|
|
Keep all reusable parameter types here.
|
|
"""
|
|
from pydantic import BaseModel
|
|
from typing import List, Optional
|
|
|
|
class LoopbackParameters(BaseModel):
|
|
iterations: int = 1
|
|
upscale: float = 1.0
|
|
denoise: float = 0.5
|
|
steps: int = 10
|
|
cfg: float = 7.0
|
|
|
|
class LoraParameters(BaseModel):
|
|
strength_model: float = 1.0
|
|
strength_clip: float = 1.0
|
|
|
|
class Lora(BaseModel):
|
|
apiName: str
|
|
disabled: bool = False
|
|
parameters: LoraParameters = LoraParameters()
|
|
|
|
class ControlnetParameters(BaseModel):
|
|
strength: float = 1.0
|
|
start_percent: float = 0.0
|
|
end_percent: float = 1.0
|
|
|
|
class Controlnet(BaseModel):
|
|
apiName: str
|
|
disabled: bool = False
|
|
parameters: ControlnetParameters = ControlnetParameters()
|
|
|
|
# Add more shared types as needed
|