Spaces:
Running
on
Zero
Running
on
Zero
diff --git a/src/models/textured_mesh.py b/src/models/textured_mesh.py | |
index 75ffb6d..40d30e6 100644 | |
--- a/src/models/textured_mesh.py | |
+++ b/src/models/textured_mesh.py | |
class TexturedMeshModel(nn.Module): | |
self.renderer = Renderer(device=self.device, dim=(render_grid_size, render_grid_size), | |
interpolation_mode=self.opt.texture_interpolation_mode) | |
- self.env_sphere, self.mesh = self.init_meshes() | |
+ self.env_sphere, self.mesh = self.init_meshes(opt.shape_path) | |
self.default_color = [0.8, 0.1, 0.8] | |
self.background_sphere_colors, self.texture_img = self.init_paint() | |
self.meta_texture_img = nn.Parameter(torch.zeros_like(self.texture_img)) | |
diff --git a/src/stable_diffusion_depth.py b/src/stable_diffusion_depth.py | |
index 610d2de..e172080 100644 | |
--- a/src/stable_diffusion_depth.py | |
+++ b/src/stable_diffusion_depth.py | |
+import os | |
+ | |
from diffusers import AutoencoderKL, UNet2DConditionModel, PNDMScheduler | |
from huggingface_hub import hf_hub_download | |
from transformers import CLIPTextModel, CLIPTokenizer, logging | |
class StableDiffusion(nn.Module): | |
super().__init__() | |
try: | |
- with open('./TOKEN', 'r') as f: | |
- self.token = f.read().replace('\n', '') # remove the last \n! | |
- logger.info(f'loaded hugging face access token from ./TOKEN!') | |
+ self.token = os.getenv('HF_TOKEN') | |
except FileNotFoundError as e: | |
self.token = True | |
logger.warning( | |