feat: use class PerformanceLoRA instead of strings in config
This commit is contained in:
parent
4127fa410b
commit
9564341fbd
|
|
@ -634,26 +634,27 @@ def downloading_sdxl_lcm_lora():
|
|||
load_file_from_url(
|
||||
url='https://huggingface.co/lllyasviel/misc/resolve/main/sdxl_lcm_lora.safetensors',
|
||||
model_dir=paths_loras[0],
|
||||
file_name=sdxl_lcm_lora
|
||||
file_name=modules.flags.PerformanceLoRA.EXTREME_SPEED.value
|
||||
)
|
||||
return sdxl_lcm_lora
|
||||
return modules.flags.PerformanceLoRA.EXTREME_SPEED.value
|
||||
|
||||
|
||||
def downloading_sdxl_lightning_lora():
|
||||
load_file_from_url(
|
||||
url='https://huggingface.co/mashb1t/misc/resolve/main/sdxl_lightning_4step_lora.safetensors',
|
||||
model_dir=paths_loras[0],
|
||||
file_name=sdxl_lightning_lora
|
||||
file_name=modules.flags.PerformanceLoRA.LIGHTNING.value
|
||||
)
|
||||
return sdxl_lightning_lora
|
||||
return modules.flags.PerformanceLoRA.LIGHTNING.value
|
||||
|
||||
|
||||
def downloading_sdxl_hyper_sd_lora():
|
||||
load_file_from_url(
|
||||
url='https://huggingface.co/mashb1t/misc/resolve/main/sdxl_hyper_sd_4step_lora.safetensors',
|
||||
model_dir=paths_loras[0],
|
||||
file_name=sdxl_hyper_sd_lora
|
||||
file_name=modules.flags.PerformanceLoRA.HYPER_SD.value
|
||||
)
|
||||
return sdxl_hyper_sd_lora
|
||||
return modules.flags.PerformanceLoRA.HYPER_SD.value
|
||||
|
||||
|
||||
def downloading_controlnet_canny():
|
||||
|
|
|
|||
|
|
@ -115,6 +115,14 @@ class OutputFormat(Enum):
|
|||
return list(map(lambda c: c.value, cls))
|
||||
|
||||
|
||||
class PerformanceLoRA(Enum):
|
||||
QUALITY = None
|
||||
SPEED = None
|
||||
EXTREME_SPEED = 'sdxl_lcm_lora.safetensors'
|
||||
LIGHTNING = 'sdxl_lightning_4step_lora.safetensors'
|
||||
HYPER_SD = 'sdxl_hyper_sd_4step_lora.safetensors'
|
||||
|
||||
|
||||
class Steps(IntEnum):
|
||||
QUALITY = 60
|
||||
SPEED = 30
|
||||
|
|
|
|||
Loading…
Reference in New Issue