pipe.enable_lora_hotswap(target_rank=max_rank) pipe.load_lora_weights() # compile *after* loading the first LoRA pipe.transformer.compile(mode="max-autotune", fullgraph=True) image = pipe(**pipe_kwargs).images[0] # from this point on, load new LoRAs with `hotswap=True` pipe.load_lora_weights(, hotswap=True) image = pipe(**pipe_kwargs).images[0]