torch.cuda.empty_cache()
Browse files395 unmodified lines396397398399400401395 unmodified linesx_samples = (einops.rearrange(samples, 'b c h w -> b h w c') * 127.5 + 127.5).cpu().numpy().round().clip(0, 255).astype(np.uint8)results = [x_samples[i] for i in range(num_samples)]# All the results have the same sizeinput_height, input_width, input_channel = np.array(input_image).shape395 unmodified lines396397398399400401402395 unmodified linesx_samples = (einops.rearrange(samples, 'b c h w -> b h w c') * 127.5 + 127.5).cpu().numpy().round().clip(0, 255).astype(np.uint8)results = [x_samples[i] for i in range(num_samples)]torch.cuda.empty_cache()# All the results have the same sizeinput_height, input_width, input_channel = np.array(input_image).shape
app.py+1