Spaces:
Running
on
Zero
Bug when running the space locally
when i run the app.py i get this error message what could be the reason for it
Traceback (most recent call last):
File "C:\Users\user\Shap-E\app.py", line 8, in
from app_image_to_3d import create_demo as create_demo_image_to_3d
File "C:\Users\user\Shap-E\app_image_to_3d.py", line 9, in
from model import Model
File "C:\Users\user\Shap-E\model.py", line 53, in
xm: Transmitter | VectorDecoder,
TypeError: unsupported operand type(s) for |: 'type' and 'type'
Change the function with this:
def decode_latent_mesh(xm, latent):
decoded = xm.renderer.render_views(
AttrDict(cameras=create_pan_cameras(
2, latent.device)), # lowest resolution possible
params=(xm.encoder if isinstance(xm, Transmitter) else
xm).bottleneck_to_params(latent[None]),
options=AttrDict(rendering_mode='stf', render_with_direction=False),
)
return decoded.raw_meshes[0]
@hysts this space doesn't run on MacOS. Anyway, you can modify it to enable it to run on mps as well?
Hi
@ghpkishore
I'm not sure if we can make this Space work on MPS as I'm not familiar with the Mac environment. I usually test my Spaces only on Ubuntu.
There seems to be multiple issues in the original repo about Mac, so maybe it's not easy. This Space is basically a GUI wrapper of the original code, so we can update the Space once they update their code to make it work on MPS, though.