4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00

Set min render value for viewer (#1339)

This commit is contained in:
Matthew Tancik 2023-02-02 12:55:03 -08:00 committed by GitHub
parent ef9e00e614
commit 3ab9352be8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -826,7 +826,7 @@ class ViewerState:
else:
image_height = (num_vis_rays / aspect_ratio) ** 0.5
image_height = int(round(image_height, -1))
image_height = min(self.max_resolution, image_height)
image_height = max(min(self.max_resolution, image_height), 30)
image_width = int(image_height * aspect_ratio)
if image_width > self.max_resolution:
image_width = self.max_resolution