(self, args)
| 317 | image = load_image(url).convert("L") |
| 318 | |
| 319 | def __init__(self, args): |
| 320 | aux_network = self.aux_network_class.from_pretrained(args.ckpt, torch_dtype=torch.float16) |
| 321 | pipe = self.pipeline_class.from_pretrained(self.root_ckpt, adapter=aux_network, torch_dtype=torch.float16) |
| 322 | pipe = pipe.to("cuda") |
| 323 | |
| 324 | pipe.set_progress_bar_config(disable=True) |
| 325 | self.pipe = pipe |
| 326 | |
| 327 | if args.run_compile: |
| 328 | pipe.unet.to(memory_format=torch.channels_last) |
| 329 | pipe.adapter.to(memory_format=torch.channels_last) |
| 330 | |
| 331 | print("Run torch compile") |
| 332 | pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True) |
| 333 | pipe.adapter = torch.compile(pipe.adapter, mode="reduce-overhead", fullgraph=True) |
| 334 | |
| 335 | self.image = self.image.resize(RESOLUTION_MAPPING[args.ckpt]) |
| 336 | |
| 337 | |
| 338 | class T2IAdapterSDXLBenchmark(T2IAdapterBenchmark): |
nothing calls this directly
no test coverage detected