cvlab-columbia / pix2gestalt

Code for the paper "pix2gestalt: Amodal Segmentation by Synthesizing Wholes" (CVPR 2024)
https://gestalt.cs.columbia.edu/
Other
119 stars 8 forks source link

Question of Demo or Inference in the app.py #12

Open HaoqianSong opened 1 month ago

HaoqianSong commented 1 month ago

Hello, I have some doubts.

HaoqianSong commented 1 month ago

Can app.py only run on one GPU, not multiple GPUs? In addition, because the graphics card is too small, I modified the following two places to load the model for the CPU, and some problem occurred. defload_model_from_config(config, ckpt, device, verbose=False): global closure_device closure_device = device print(f"Loading model from {ckpt}") pl_sd = torch.load(ckpt, map_location=device) #"cpu" if "global_step" in pl_sd: print(f"Global Step: {pl_sd['global_step']}") sd = pl_sd["state_dict"] model = instantiate_from_config(config.model) m, u = model.load_state_dict(sd, strict=False) if len(m) > 0 and verbose: print("missing keys:") print(m) if len(u) > 0 and verbose: print("unexpected keys:") print(u) model.to(device) #"cpu" model.eval() return model