merging + text embedding bugfix

This commit is contained in:
terrancewang committed 2023-03-15 13:34:43 -07:00
1 parent 978bf1d12d
commit a449219f91
70 files changed
+2465 -735

No files matched your search

@@ -18,6 +18,7 @@ Stable diffusion utils
from torchtyping import TensorType
from typing_extensions import Literal
import torch
from nerfstudio.generative.stable_diffusion import StableDiffusion
@@ -77,6 +78,9 @@ class PositionalTextEmbeddings:
vertical_angle: vertical angle of the camera
horizonal_angle: horizonal angle of the camera
"""
# set horizontal_angle between 0, 360
horizontal_angle = torch.fmod(horizontal_angle, 360)
horizontal_angle = torch.where(horizontal_angle < 0, horizontal_angle + 360, horizontal_angle)
if self.positional_prompting == "discrete":
if vertical_angle < 40: