KU-CVLAB / 3DFuse

Official implementation of "Let 2D Diffusion Model Know 3D-Consistency for Robust Text-to-3D Generation"
711 stars 42 forks source link

IndexError: boolean index did not match indexed array along dimension 2; dimension is 3 but corresponding boolean dimension is #26

Closed wangmiaowei closed 1 year ago

wangmiaowei commented 1 year ago

seed set to 0 path: /root/.cache/carvekit/checkpoints/tracer_b7/tracer_b7.pth path: /root/.cache/carvekit/checkpoints/fba/fba_matting.pth 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [00:00<00:00, 110.85it/s] 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [00:01<00:00, 16.74it/s] 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 10.95it/s] ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/miaowei/programs/3DFuse/run_3DFuse.py:353 in │ │ │ │ 350 │ │ 351 │ │ 352 if name == "main": │ │ ❱ 353 │ dispatch(SJC_3DFuse) │ │ 354 │ │ │ │ /home/miaowei/programs/3DFuse/my/config.py:91 in dispatch │ │ │ │ 88 │ os.makedirs(exp_path, exist_ok=True) │ │ 89 │ write_full_config(mod, os.path.join(exp_path,"full_config.yml")) │ │ 90 │ │ │ ❱ 91 │ mod.run() │ │ 92 │ │ 93 def dispatch_gradio(module, prompt, keyword, ti_step, pt_step, seed, exp_instance_dir): │ │ 94 │ cfg = optional_load_config("gradio_init.yml") │ │ │ │ /home/miaowei/programs/3DFuse/run_3DFuse.py:100 in run │ │ │ │ 97 │ │ image_dir=os.path.join(exp_instance_dir,'initial_image') │ │ 98 │ │ │ │ 99 │ │ if semantic_model == "Karlo": │ │ ❱ 100 │ │ │ semantic_karlo(initial_prompt,image_dir,cfgs['num_initial_image'],cfgs['bg_p │ │ 101 │ │ elif semantic_model == "SD": │ │ 102 │ │ │ semantic_sd(initial_prompt,image_dir,cfgs['num_initial_image'],cfgs['bg_prep │ │ 103 │ │ else: │ │ │ │ /home/miaowei/programs/3DFuse/semantic_coding.py:50 in semantic_karlo │ │ │ │ 47 │ │ │ img_without_background = interface([image]) │ │ 48 │ │ │ mask = np.array(img_without_background[0]) > 127 │ │ 49 │ │ │ image = np.array(image) │ │ ❱ 50 │ │ │ image[~mask] = [255., 255., 255.] │ │ 51 │ │ │ # x, y, w, h = cv2.boundingRect(mask.astype(np.uint8)) │ │ 52 │ │ │ # image = image[y:y+h, x:x+w, :] │ │ 53 │ │ │ image = Image.fromarray(np.array(image)) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ IndexError: boolean index did not match indexed array along dimension 2; dimension is 3 but corresponding boolean dimension is 4

j0seo commented 1 year ago

Hi. It seems like that issue might be related to #6 . Could you check it?