mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-21 15:15:43 +08:00
Bump minimum Python version to 3.8 (#1876)
* Bump minimum Python version to 3.8 * typing_extensions.Literal -> typing.Literal * ns-dev-test * typing_extensions.get_args => typing.get_args * Format with older version of black * Bump `black` * Run black
This commit is contained in:
1 parent
7537551f38
commit
63c6303736
58 files changed
+70
-117
No files matched your search
@@ -16,11 +16,11 @@
|
||||
Collection of Losses.
|
||||
"""
|
||||
from enum import Enum
|
||||
from typing import Literal
|
||||
|
||||
import torch
|
||||
from torch import nn
|
||||
from torchtyping import TensorType
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.cameras.rays import RaySamples
|
||||
from nerfstudio.utils.math import masked_reduction, normalized_depth_scale_and_shift
|
||||
|
||||
@@ -384,7 +384,6 @@ class VolumetricSampler(Sampler):
|
||||
occupancy_grid: OccGridEstimator,
|
||||
density_fn: Optional[Callable[[TensorType[..., 3]], TensorType[..., 1]]] = None,
|
||||
) -> None:
|
||||
|
||||
super().__init__()
|
||||
assert occupancy_grid is not None
|
||||
self.density_fn = density_fn
|
||||
@@ -651,7 +650,6 @@ class NeuSSampler(Sampler):
|
||||
base_variance = self.base_variance
|
||||
|
||||
while total_iters < self.num_upsample_steps:
|
||||
|
||||
with torch.no_grad():
|
||||
new_sdf = sdf_fn(new_samples)
|
||||
|
||||
|
||||
@@ -28,13 +28,12 @@ Example:
|
||||
"""
|
||||
import contextlib
|
||||
import math
|
||||
from typing import Generator, Optional, Union
|
||||
from typing import Generator, Literal, Optional, Union
|
||||
|
||||
import nerfacc
|
||||
import torch
|
||||
from torch import nn
|
||||
from torchtyping import TensorType
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.cameras.rays import RaySamples
|
||||
from nerfstudio.utils import colors
|
||||
|
||||
Reference in new issue
Block a user