diff --git a/lama_cleaner/const.py b/lama_cleaner/const.py index d6125b7..1b749a8 100644 --- a/lama_cleaner/const.py +++ b/lama_cleaner/const.py @@ -36,9 +36,19 @@ AVAILABLE_MODELS = [ "sdxl", ] SD15_MODELS = ["sd1.5", "anything4", "realisticVision1.4"] -MODELS_SUPPORT_FREEU = SD15_MODELS + ["sd2", "sdxl"] +MODELS_SUPPORT_FREEU = SD15_MODELS + ["sd2", "sdxl", "instruct_pix2pix"] MODELS_SUPPORT_LCM_LORA = SD15_MODELS + ["sdxl"] +FREEU_DEFAULT_CONFIGS = { + "sd2": dict(s1=0.9, s2=0.2, b1=1.1, b2=1.2), + "sdxl": dict(s1=0.6, s2=0.4, b1=1.1, b2=1.2), + "sd1.5": dict(s1=0.9, s2=0.2, b1=1.2, b2=1.4), + "anything4": dict(s1=0.9, s2=0.2, b1=1.2, b2=1.4), + "realisticVision1.4": dict(s1=0.9, s2=0.2, b1=1.2, b2=1.4), + "instruct_pix2pix": dict(s1=0.9, s2=0.2, b1=1.2, b2=1.4), +} + + AVAILABLE_DEVICES = ["cuda", "cpu", "mps"] DEFAULT_DEVICE = "cuda" @@ -110,14 +120,6 @@ QUALITY_HELP = """ Quality of image encoding, 0-100. Default is 95, higher quality will generate larger file size. """ -FREEU_DEFAULT_CONFIGS = { - "sd2": dict(s1=0.9, s2=0.2, b1=1.1, b2=1.2), - "sdxl": dict(s1=0.6, s2=0.4, b1=1.1, b2=1.2), - "sd1.5": dict(s1=0.9, s2=0.2, b1=1.2, b2=1.4), - "anything4": dict(s1=0.9, s2=0.2, b1=1.2, b2=1.4), - "realisticVision1.4": dict(s1=0.9, s2=0.2, b1=1.2, b2=1.4), -} - class RealESRGANModelName(str, Enum): realesr_general_x4v3 = "realesr-general-x4v3"