mirror of
https://github.com/deepseek-ai/DreamCraft3D.git
synced 2025-02-23 14:28:55 -05:00
30 lines
628 B
Python
30 lines
628 B
Python
import random
|
|
from dataclasses import dataclass, field
|
|
|
|
import torch
|
|
import torch.nn as nn
|
|
import torch.nn.functional as F
|
|
|
|
import threestudio
|
|
from threestudio.utils.base import BaseModule
|
|
from threestudio.utils.typing import *
|
|
|
|
|
|
class BaseMaterial(BaseModule):
|
|
@dataclass
|
|
class Config(BaseModule.Config):
|
|
pass
|
|
|
|
cfg: Config
|
|
requires_normal: bool = False
|
|
requires_tangent: bool = False
|
|
|
|
def configure(self):
|
|
pass
|
|
|
|
def forward(self, *args, **kwargs) -> Float[Tensor, "*B 3"]:
|
|
raise NotImplementedError
|
|
|
|
def export(self, *args, **kwargs) -> Dict[str, Any]:
|
|
return {}
|