"git@developer.sourcefind.cn:OpenDAS/autoawq.git" did not exist on "edcf780fceef5bacff0c8795d92d927df22e0717"
Unverified Commit 4367b8a3 authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

move pipeline only when running validation (#4515)

parent f4f85413
......@@ -1311,14 +1311,13 @@ def main(args):
pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config, **scheduler_args)
pipeline = pipeline.to(accelerator.device)
# load attention processors
pipeline.load_lora_weights(args.output_dir)
# run inference
images = []
if args.validation_prompt and args.num_validation_images > 0:
pipeline = pipeline.to(accelerator.device)
generator = torch.Generator(device=accelerator.device).manual_seed(args.seed) if args.seed else None
images = [
pipeline(args.validation_prompt, num_inference_steps=25, generator=generator).images[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment