Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to load costum splat #56

Open
DuVogel87 opened this issue Sep 26, 2024 · 15 comments
Open

Fail to load costum splat #56

DuVogel87 opened this issue Sep 26, 2024 · 15 comments

Comments

@DuVogel87
Copy link

I am not able to view/load my costum splats. Whatever i do i always get to see the default model "train".

Here is what i did:

  1. I cloned the repo (git clone https://github.com/antimatter15/splat.git)
  2. I did python -m venv venv
  3. I did pip install plyfile
  4. I converted my .ply to a .splat
  5. I created a folder "model" and put in the output.splat (i renamed output.splat to test.splat
  6. I did python -m http-server, server started
  7. I copied this to my browser url: localhost:8000/?model=test

I have no idea what i am doing wrong. Can someone please help me here? Thanks!

@daviszhu88
Copy link

Try this
localhost:8000/?url=test.splat

@DuVogel87
Copy link
Author

When i do localhost:8000/?url=test.splat it says:

error: 404 unable to load https://huggingface.co/cakewalk/splat-data/resolve/main/test.splat

@daviszhu88
Copy link

You need to replace the line in the main.js from
"https://huggingface.co/cakewalk/splat-data/resolve/main/",
to
"http://localhost:8000/",

@DuVogel87
Copy link
Author

Doesnt work. I did as you said. here is the code i changed due to your last post:

} catch (err) {}
const url = new URL(
// "nike.splat",
// location.href,
params.get("url") || "test.splat",
"http://localhost:8000/",
);
when i try to open http://localhost:8000/ or localhost:8000/?model=test.splat in my browser both lead to the same error:

Error: 404 Unable to load http://localhost:8000/train.splat

@daviszhu88
Copy link

You might need to refresh the page. It should not say train.splat if you made the code change.

Btw, it should be
localhost:8000/?url=test.splat

@DuVogel87
Copy link
Author

DuVogel87 commented Sep 28, 2024

i changed to code:

const url = new URL(
    // "nike.splat",
    // location.href,
    params.get("url") || "train.splat",
    "http://localhost:8000/", // Changed from "https://huggingface.co/cakewalk/splat-data/resolve/main/"
);

i do: .\venv\Scripts\activate.bat

i start: python -m http.server

i enter in browser: localhost:8000/?url=test.splat

still no succes! 

Error: 404 Unable to load http://localhost:8000/test.splat

It's really strange why it doesnt work. I do everything as you say.

@daviszhu88
Copy link

Likely it could be CORS. Please install the extension and enable it.

@DuVogel87
Copy link
Author

this?

https://github.com/expressjs/cors

@daviszhu88
Copy link

In Chrome setting menu, click Extensions->Manage Extensions
image

@DuVogel87
Copy link
Author

Nope. Doesn't change a thing.

Is there an instruction on how to clone, install and run splat?

I think its something very easy that doesn't work here right now.

@daviszhu88
Copy link

Did you install the extension and turned it on? Please provide a screenshot like this
image

The CORS symbol should be red.

@DuVogel87
Copy link
Author

DuVogel87 commented Sep 28, 2024

sure. here is a screenshot of my running firefox and cors extension:

Cors

@daviszhu88
Copy link

I am not sure about Firefox. Could you try Google Chrome?

@DuVogel87
Copy link
Author

Okay i installe chrome and the extension. no, nothing happens. just the blue loading cube spinning endlessly.

@daviszhu88
Copy link

The model file should be at the same place as the main.js.

Please post a screenshot of the http server running window. What is the message there? Also you can open the chrome developer tool and see what error raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants