mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-30 21:09:58 +08:00
improve memory consumption by clearing cache + move image to cpu (#412)
* reduced mem on train; figuring out memory leak on visualizer * steadily below 10G memory * cpu loading image * update docstrings * added scrolling * Revert "update docstrings" This reverts commita914387cf8. * Revert "Revert "update docstrings"" This reverts commit177c3dd6f1. * Revert "added scrolling" This reverts commitf37351ee7f.
This commit is contained in:
1 parent
54f7affe02
commit
4801a99b2a
11 files changed
+22
-12
No files matched your search
@@ -32,6 +32,7 @@ from nerfactory.datamanagers.datasets import InputDataset
|
||||
from nerfactory.models.base import Model
|
||||
from nerfactory.utils import profiler, visualization, writer
|
||||
from nerfactory.utils.decorators import check_visualizer_enabled, decorate_all
|
||||
from nerfactory.utils.misc import get_dict_to_torch
|
||||
from nerfactory.utils.writer import GLOBAL_BUFFER, EventName, TimeWriter
|
||||
from nerfactory.viewer.server.subprocess import run_viewer_bridge_server_as_subprocess
|
||||
from nerfactory.viewer.server.utils import get_intrinsics_matrix_and_camera_to_world_h
|
||||
@@ -107,6 +108,7 @@ class RenderThread(threading.Thread):
|
||||
self.exc = e
|
||||
|
||||
if outputs:
|
||||
outputs = get_dict_to_torch(outputs)
|
||||
self.vis_outputs = outputs
|
||||
|
||||
self.state.check_done_render = True
|
||||
@@ -114,6 +116,7 @@ class RenderThread(threading.Thread):
|
||||
|
||||
def join(self, timeout=None):
|
||||
threading.Thread.join(self)
|
||||
torch.cuda.empty_cache()
|
||||
if self.exc:
|
||||
raise self.exc
|
||||
|
||||
|
||||
Reference in new issue
Block a user