1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Fix AttributeError in train_lcm_distill_lora_sdxl_wds.py (#7923)

Fix conditional teacher model check in train_lcm_distill_lora_sdxl_wds.py

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
Alphin Jain
2024-05-16 15:49:54 +05:30
committed by GitHub
parent 746f603b20
commit 1221b28eac

View File

@@ -1358,7 +1358,7 @@ def main(args):
# estimates to predict the data point in the augmented PF-ODE trajectory corresponding to the next ODE
# solver timestep.
with torch.no_grad():
if torch.backends.mps.is_available() or "playground" in args.pretrained_model_name_or_path:
if torch.backends.mps.is_available() or "playground" in args.pretrained_teacher_model:
autocast_ctx = nullcontext()
else:
autocast_ctx = torch.autocast(accelerator.device.type)