MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / __init__

Method __init__

diffusers/benchmarks/base_classes.py:319–335  ·  view source on GitHub ↗
(self, args)

Source from the content-addressed store, hash-verified

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
338class T2IAdapterSDXLBenchmark(T2IAdapterBenchmark):

Callers

nothing calls this directly

Calls 4

from_pretrainedMethod · 0.45
toMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected