Spaces:
Runtime error
Runtime error
pengHTYX
commited on
Commit
•
0495978
1
Parent(s):
940a706
'update'
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ from einops import rearrange
|
|
23 |
import numpy as np
|
24 |
import subprocess
|
25 |
from datetime import datetime
|
26 |
-
|
27 |
def save_image(tensor):
|
28 |
ndarr = tensor.mul(255).add_(0.5).clamp_(0, 255).permute(1, 2, 0).to("cpu", torch.uint8).numpy()
|
29 |
# pdb.set_trace()
|
@@ -186,7 +186,15 @@ def run_pipeline(pipeline, cfg, single_image, guidance_scale, steps, seed, crop_
|
|
186 |
prompt_embeddings = torch.cat([normal_prompt_embeddings, clr_prompt_embeddings], dim=0)
|
187 |
prompt_embeddings = rearrange(prompt_embeddings, "B Nv N C -> (B Nv) N C")
|
188 |
|
189 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
out = pipeline(
|
191 |
imgs_in,
|
192 |
None,
|
@@ -296,11 +304,9 @@ def run_demo():
|
|
296 |
|
297 |
pipeline = load_era3d_pipeline(cfg)
|
298 |
torch.set_grad_enabled(False)
|
299 |
-
print(1)
|
300 |
pipeline.to(device=f'cuda:{_GPU_ID}')
|
301 |
# pipeline.unet.enable_xformers_memory_efficient_attention()
|
302 |
|
303 |
-
print(2)
|
304 |
predictor = sam_init()
|
305 |
|
306 |
|
|
|
23 |
import numpy as np
|
24 |
import subprocess
|
25 |
from datetime import datetime
|
26 |
+
from icecream import ic
|
27 |
def save_image(tensor):
|
28 |
ndarr = tensor.mul(255).add_(0.5).clamp_(0, 255).permute(1, 2, 0).to("cpu", torch.uint8).numpy()
|
29 |
# pdb.set_trace()
|
|
|
186 |
prompt_embeddings = torch.cat([normal_prompt_embeddings, clr_prompt_embeddings], dim=0)
|
187 |
prompt_embeddings = rearrange(prompt_embeddings, "B Nv N C -> (B Nv) N C")
|
188 |
|
189 |
+
ic(pipeline.unet.device)
|
190 |
+
ic(pipeline.unet.dtype)
|
191 |
+
|
192 |
+
ic(imgs_in.device)
|
193 |
+
ic(imgs_in.dtype)
|
194 |
+
|
195 |
+
ic(prompt_embeddings.device)
|
196 |
+
ic(prompt_embeddings.dtype)
|
197 |
+
|
198 |
out = pipeline(
|
199 |
imgs_in,
|
200 |
None,
|
|
|
304 |
|
305 |
pipeline = load_era3d_pipeline(cfg)
|
306 |
torch.set_grad_enabled(False)
|
|
|
307 |
pipeline.to(device=f'cuda:{_GPU_ID}')
|
308 |
# pipeline.unet.enable_xformers_memory_efficient_attention()
|
309 |
|
|
|
310 |
predictor = sam_init()
|
311 |
|
312 |
|