Spaces:
Build error
Build error
update
Browse filesFiles changed (5)
2 unmodified lines34567891011122 unmodified linesimport torchimport torch.nn as nnimport torch.nn.functional as Fimport sysfrom grpc import insecure_channelfrom sympy import usefrom pathlib import Pathdef exists(val):2 unmodified lines3456782 unmodified linesimport torchimport torch.nn as nnimport torch.nn.functional as Fdef exists(val):
1234523 unmodified lines293031import torch.nn as nnfrom .sam import SAMPromptModelfrom .selfattn import SelfAttnPromptModel__all__ = [23 unmodified linespatch_w,)return features123423 unmodified lines2829303132333435363738import torch.nn as nnfrom .selfattn import SelfAttnPromptModel__all__ = [23 unmodified linespatch_w,)return featuresdef __getattr__(name: str):if name == "SAMPromptModel":from .sam import SAMPromptModelreturn SAMPromptModelraise AttributeError(f"module {__name__!r} has no attribute {name!r}")
237 unmodified lines238239240241242243237 unmodified linesclass MemEffAttention(Attention):def forward(self, q: Tensor, k: Tensor, v: Tensor) -> Tensor:q = self.q_proj(q)k = self.k_proj(k)v = self.v_proj(v)237 unmodified lines238239240241242243244245237 unmodified linesclass MemEffAttention(Attention):def forward(self, q: Tensor, k: Tensor, v: Tensor) -> Tensor:if not XFORMERS_AVAILABLE:return super().forward(q, k, v)q = self.q_proj(q)k = self.k_proj(k)v = self.v_proj(v)
5 unmodified lines678910111272 unmodified lines8586878889905 unmodified linesimport copyimport cv2import numpy as npimport onnxruntimedef visualize_normal(n, save_path="normal_map.png"):72 unmodified linesdef build_sky_model(model_path="checkpoints/skyseg.onnx"):return onnxruntime.InferenceSession(model_path)5 unmodified lines6789101172 unmodified lines8485868788899091929394955 unmodified linesimport copyimport cv2import numpy as npdef visualize_normal(n, save_path="normal_map.png"):72 unmodified linesdef build_sky_model(model_path="checkpoints/skyseg.onnx"):try:import onnxruntimeexcept ImportError as exc:raise ImportError("onnxruntime is only required for the optional sky-segmentation path.") from excreturn onnxruntime.InferenceSession(model_path)
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152# python version >= 3.9 <= 3.11# torchtorch==2.9.1torchvision==0.24.1torchaudio==2.9.1xformers==0.0.33.post2hydra-colorloghydra-coreh5pylightning==2.1.3imageio>=2.33.1Pillow>=10.1.0imageio-ffmpegeinops# Diffusiondiffusers[torch]transformers# raytermcolorrichtensorboardXnumpy==1.26.4opencv-python==4.9.0.80scipymatplotlibopen3domegaconftyroipdbtensorboardtimmpre-commitopenexrnumbakorniatrimeshtransformations# flash_attnscikit-imagehuggingface_hub>=0.24.0plotly>=5.22.0onnxruntimescikit-learn# HuggingFace Spaces ZeroGPU support# NOTE: Do NOT list 'gradio' here — it is managed by sdk_version in README.md.# Listing it again can downgrade/conflict with the pre-installed version and break# the ZeroGPU proxy token mechanism.spaces# mogegit+https://github.com/microsoft/MoGe.git123456789101112131415161718192021222324252627282930313233# Runtime dependencies for the Hugging Face Space demo.# Keep this list tight: ZeroGPU is more stable with a smaller dependency surface.torch==2.9.1torchvision==0.24.1numpy==1.26.4Pillow>=10.1.0opencv-python==4.9.0.80scipymatplotlibimageio>=2.33.1imageio-ffmpegh5pyopen3deinopshuggingface_hub>=0.24.0scikit-learntrimeshtimm# Hugging Face Spaces manages Gradio from README.md `sdk_version`.# Do not pin `gradio` here.## ZeroGPU support comes from the Space runtime itself; avoid pinning `spaces`# unless debugging a specific runtime regression.## `xformers` and `onnxruntime` are intentionally omitted:# - the active demo inference path has safe fallbacks without `xformers`# - `onnxruntime` is only needed for optional sky-segmentation utilities# MoGe-2 dependency used when no depth prior is uploaded.git+https://github.com/microsoft/MoGe.git
InfiniDepth/model/block/implicit_decoder.py-4
InfiniDepth/model/block/prompt_models/__init__.py+8-1
InfiniDepth/model/block/prompt_models/utils/transformer.py+2
InfiniDepth/utils/vis_utils.py+6-1
requirements.txt+21-40