feat: add performance lightning with 4 step LoRA (#2415)

* feat: add performance sdxl lightning

based on https://huggingface.co/ByteDance/SDXL-Lightning/blob/main/sdxl_lightning_4step_lora.safetensors

* feat: add method for centralized restriction of features for specific performance modes

* feat: add lightning preset
This commit is contained in:
Manuel Schmid
2024-03-10 14:34:48 +01:00
committed by GitHub
parent b6e4bb86f4
commit 25650b4bc4
5 changed files with 92 additions and 3 deletions
+19
View File
@@ -250,6 +250,25 @@ def worker():
adm_scaler_negative = 1.0
adm_scaler_end = 0.0
elif performance_selection == Performance.LIGHTNING:
print('Enter Lightning mode.')
progressbar(async_task, 1, 'Downloading Lightning components ...')
loras += [(modules.config.downloading_sdxl_lightning_lora(), 1.0)]
if refiner_model_name != 'None':
print(f'Refiner disabled in Lightning mode.')
refiner_model_name = 'None'
sampler_name = 'euler'
scheduler_name = 'sgm_uniform'
sharpness = 0.0
guidance_scale = 1.0
adaptive_cfg = 1.0
refiner_switch = 1.0
adm_scaler_positive = 1.0
adm_scaler_negative = 1.0
adm_scaler_end = 0.0
print(f'[Parameters] Adaptive CFG = {adaptive_cfg}')
print(f'[Parameters] Sharpness = {sharpness}')
print(f'[Parameters] ControlNet Softness = {controlnet_softness}')