@@ -866,6 +866,20 @@ class ISettings(SerializableMixin):
866866 expressiveness : Optional [str ] = None
867867 removeBackground : Optional [bool ] = None
868868 backgroundColor : Optional [str ] = None
869+ # Image upscale
870+ steps : Optional [int ] = None
871+ seed : Optional [int ] = None
872+ CFGScale : Optional [float ] = None
873+ positivePrompt : Optional [str ] = None
874+ negativePrompt : Optional [str ] = None
875+ controlNetWeight : Optional [float ] = None
876+ strength : Optional [float ] = None
877+ scheduler : Optional [str ] = None
878+ colorFix : Optional [bool ] = None
879+ tileDiffusion : Optional [bool ] = None
880+ clipSkip : Optional [int ] = None
881+ enhanceDetails : Optional [bool ] = None
882+ realism : Optional [bool ] = None
869883
870884 def __post_init__ (self ):
871885 if self .sparseStructure is not None and isinstance (self .sparseStructure , dict ):
@@ -880,6 +894,18 @@ def request_key(self) -> str:
880894 return "settings"
881895
882896
897+ @dataclass
898+ class IUpscaleSettings (ISettings ):
899+
900+ def __post_init__ (self ):
901+ super ().__post_init__ ()
902+ warnings .warn (
903+ "IUpscaleSettings is deprecated and will be removed in a future release; use ISettings for image upscale settings instead." ,
904+ DeprecationWarning ,
905+ stacklevel = 3 ,
906+ )
907+
908+
883909@dataclass
884910class IInputFrame (SerializableMixin ):
885911 image : Union [str , File ]
@@ -1241,45 +1267,25 @@ def __hash__(self):
12411267 return hash ((self .taskType , self .taskUUID , self .text , self .cost ))
12421268
12431269
1244- @dataclass
1245- class IUpscaleSettings :
1246- # Common parameters across all upscaler models
1247- steps : Optional [int ] = None # Quality steps (4-60 depending on model)
1248- seed : Optional [int ] = None # Reproducibility toggle
1249- CFGScale : Optional [float ] = None # Guidance CFG (3-20 depending on model)
1250- positivePrompt : Optional [str ] = None
1251- negativePrompt : Optional [str ] = None
1252-
1253- # Clarity upscaler specific
1254- controlNetWeight : Optional [float ] = None # Style preservation/Resemblance (0-1)
1255- strength : Optional [float ] = None # Creativity (0-1)
1256- scheduler : Optional [str ] = None # Controls noise addition/removal
1257-
1258- # CCSR and Latent upscaler specific
1259- colorFix : Optional [bool ] = None # Color correction (ADAIN/NOFIX)
1260- tileDiffusion : Optional [bool ] = None # Tile diffusion for large images
1261-
1262- # Latent upscaler specific
1263- clipSkip : Optional [int ] = None # Skip CLIP layers during guidance (0-2)
1264-
1265-
12661270@dataclass
12671271class IImageUpscale :
1268- upscaleFactor : float # Changed to float to support decimal values like 1.5
1272+ upscaleFactor : Optional [float ] = None
1273+ targetMegapixels : Optional [int ] = None
12691274 inputImage : Optional [Union [str , File ]] = None
12701275 model : Optional [str ] = None # Model AIR ID (runware:500@1, runware:501@1, runware:502@1, runware:503@1)
1271- settings : Optional [Union [IUpscaleSettings , Dict [str , Any ]]] = None # Advanced upscaling settings
1276+ settings : Optional [Union [ISettings , Dict [str , Any ]]] = None
12721277 outputType : Optional [IOutputType ] = None
12731278 outputFormat : Optional [IOutputFormat ] = None
12741279 includeCost : bool = False
12751280 webhookURL : Optional [str ] = None
12761281 providerSettings : Optional [ImageProviderSettings ] = None
12771282 safety : Optional [Union [ISafety , Dict [str , Any ]]] = None
12781283 inputs : Optional [Union [IInputs , Dict [str , Any ]]] = None
1284+ deliveryMethod : str = "sync"
12791285
12801286 def __post_init__ (self ):
12811287 if self .settings is not None and isinstance (self .settings , dict ):
1282- self .settings = IUpscaleSettings (** self .settings )
1288+ self .settings = ISettings (** self .settings )
12831289 if self .safety is not None and isinstance (self .safety , dict ):
12841290 self .safety = ISafety (** self .safety )
12851291 if self .inputs is not None and isinstance (self .inputs , dict ):
0 commit comments