add sam_hq
This commit is contained in:
@@ -146,6 +146,9 @@ class InteractiveSegModel(Choices):
|
||||
vit_b = "vit_b"
|
||||
vit_l = "vit_l"
|
||||
vit_h = "vit_h"
|
||||
sam_hq_vit_b = "sam_hq_vit_b"
|
||||
sam_hq_vit_l = "sam_hq_vit_l"
|
||||
sam_hq_vit_h = "sam_hq_vit_h"
|
||||
mobile_sam = "mobile_sam"
|
||||
|
||||
|
||||
@@ -394,6 +397,15 @@ class InpaintRequest(BaseModel):
|
||||
return 0
|
||||
return v
|
||||
|
||||
@field_validator("sd_strength")
|
||||
@classmethod
|
||||
def validate_sd_strength(cls, v: float, values):
|
||||
use_extender = values.data["use_extender"]
|
||||
if use_extender:
|
||||
logger.info(f"Extender is enabled, set sd_strength=1")
|
||||
return 1.0
|
||||
return v
|
||||
|
||||
|
||||
class RunPluginRequest(BaseModel):
|
||||
name: str
|
||||
|
||||
Reference in New Issue
Block a user