point-e
point-e copied to clipboard
unexpected keyword argument 'device'
I am trying to run the text2pointcloud on windows using VSC with the jupyter notebook.
I am able to make it past the first box where torch is imported.
Now I am getting stuck in the second block when it reaches model_from_config(MODEL_CONFIGS[base_name], device). The error is TypeError: __init__() got an unexpected keyword argument 'device'.
Here is the full error log:
TypeError Traceback (most recent call last)
Cell In[2], line 5
3 print('creating base model...')
4 base_name = 'upsample'
----> 5 base_model = model_from_config(MODEL_CONFIGS[base_name], device)
6 base_model.eval()
7 base_diffusion = diffusion_from_config(DIFFUSION_CONFIGS[base_name])
File c:\point-e\point_e\models\configs.py:129, in model_from_config(config, device)
127 return UpsamplePointDiffusionTransformer(device=device, dtype=torch.float32, **config)
128 elif name == "CLIPImageGridUpsamplePointDiffusionTransformer":
--> 129 return CLIPImageGridUpsamplePointDiffusionTransformer(
130 device=device, dtype=torch.float32, **config
131 )
132 elif name == "CrossAttentionPointCloudSDFModel":
133 return CrossAttentionPointCloudSDFModel(device=device, dtype=torch.float32, **config)
File c:\point-e\point_e\models\transformer.py:428, in CLIPImageGridUpsamplePointDiffusionTransformer.__init__(self, device, dtype, n_ctx, cond_drop_prob, frozen_clip, cache_dir, **kwargs)
413 def __init__(
414 self,
415 *,
(...)
422 **kwargs,
423 ):
...
---> 55 self.c_fc = nn.Linear(width, width * 4, device=device, dtype=dtype)
56 self.c_proj = nn.Linear(width * 4, width, device=device, dtype=dtype)
57 self.gelu = nn.GELU()
TypeError: __init__() got an unexpected keyword argument 'device'
I was hoping someone knew how to fix this.
Try updating pytorch to a newer version
Thanks. That worked.