mirror of
https://github.com/black-forest-labs/flux.git
synced 2026-10-12 02:11:34 +00:00
Add Torch CUDA sync to fix timing code in cli.py (#147)
Co-authored-by: Neil Movva <[email protected]>
This commit is contained in:
@@ -215,6 +215,9 @@ def main(
|
||||
x = unpack(x.float(), opts.height, opts.width)
|
||||
with torch.autocast(device_type=torch_device.type, dtype=torch.bfloat16):
|
||||
x = ae.decode(x)
|
||||
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.synchronize()
|
||||
t1 = time.perf_counter()
|
||||
|
||||
fn = output_name.format(idx=idx)
|
||||
|
||||
Reference in New Issue
Block a user