(x, full_res)
| 144 | ###################################################################################### |
| 145 | |
| 146 | def _upscale_replicate(x, full_res): |
| 147 | x = x.permute(0, 3, 1, 2) |
| 148 | x = torch.nn.functional.pad(x, (0, full_res[1] - x.shape[3], 0, full_res[0] - x.shape[2]), 'replicate') |
| 149 | return x.permute(0, 2, 3, 1).contiguous() |
| 150 | |
| 151 | def merge_materials(materials, texcoords, tfaces, mfaces): |
| 152 | assert len(materials) > 0 |