(dtype, device)
| 44 | # 小波式模糊与分解/重构(ColorCorrector 用) |
| 45 | # ----------------------------- |
| 46 | def _make_gaussian3x3_kernel(dtype, device) -> torch.Tensor: |
| 47 | vals = [ |
| 48 | [0.0625, 0.125, 0.0625], |
| 49 | [0.125, 0.25, 0.125 ], |
| 50 | [0.0625, 0.125, 0.0625], |
| 51 | ] |
| 52 | return torch.tensor(vals, dtype=dtype, device=device) |
| 53 | |
| 54 | |
| 55 | def _wavelet_blur(x: torch.Tensor, radius: int) -> torch.Tensor: |