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

Add share link support for beta viewer #2445

Merged
merged 6 commits into from
Sep 19, 2023
Merged

Add share link support for beta viewer #2445

merged 6 commits into from
Sep 19, 2023

Conversation

brentyi
Copy link
Collaborator

@brentyi brentyi commented Sep 19, 2023

This PR adds initial support for shareable links to the beta viewer.

Link generation can be enabled via --share True on either ns-train or ns-viewer. For example,

ns-train nerfacto --data ./data/nerfstudio/person --vis viewer_beta --share True

wil print:
image

Which, thanks @jonahbedouch's efforts on mobile support, we can open on a phone!

An example URL is https://edge-based-relational-7462.share.viser.studio, which I'll keep up for a few hours if anybody wants to check that they can access it.

Once the final beta viewer features are stable, this can also help with Colab tunnel issues + various port forward-related roadblocks that folks seem to be having (#1908 #2433 #2439).

@tancik
Copy link
Contributor

tancik commented Sep 19, 2023

This is very cool! Could we add the share link to the rich table instead of as new line?

@brentyi
Copy link
Collaborator Author

brentyi commented Sep 19, 2023

This is what I had originally; the reason I switched it is that the share link can take a second or two to generate. I can flip it back in viser, but if we choose to include it in the table:

  • The table printing will be delayed by a bit.
  • We would need to decide whether to block until the share URL is ready or return immediately, then do the print later from a background thread. The latter is obviously preferred for saving time, but I'm concerned about how printing a lot of stuff interacts with things like tqdm progress bars (probably it's OK).

@tancik
Copy link
Contributor

tancik commented Sep 19, 2023

Eventually I kinda want to make the share option opt-out and have it front and center in the table. I wasn't aware that it had a lag, though a couple of seconds is pretty short. Thoughts?

@brentyi
Copy link
Collaborator Author

brentyi commented Sep 19, 2023

Okay, let's include it in the table! I can add it to the viser to-do list.

I just measured the delay and it's much faster now, ~0.15 seconds, so this is possibly a non-issue. It probably helps that I'm on Ethernet now.

@kerrj
Copy link
Collaborator

kerrj commented Sep 19, 2023

IMO we should rename "share" in the config to something like "public-viewer" or something more descriptive

@brentyi
Copy link
Collaborator Author

brentyi commented Sep 19, 2023

I'm okay with something like --create-share-url True?

Copy link
Collaborator

@kerrj kerrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@brentyi brentyi merged commit 3e1d4af into main Sep 19, 2023
4 checks passed
@brentyi brentyi deleted the brent/share_links branch September 19, 2023 23:22
@smart4654154
Copy link

Thank you very much for your work. I use: C:\Users\zzl\erfstudio\outputs\kitchen\erfacto\2024-01-25_131124\config.yml --vis viewer_ Beta
I click http://0.0.0.0:7007/, and browser display can't reach.
1
image

When I use ns viewer -- load configuration C:\Users\zzl\erfstudio\outputs\kitchen\erfacto\2024-01-25_131124\config.yml --vis viewer_ Beta --viewer.make-share-url True. I can obtain new connections and open it
image

Does this mean that --viewer.make-share-url is an effective solution to my problem?
(I am a beginner and English is poor, and my question may be a simple one.Thank you very much for your help.)

@jonahbedouch
Copy link

jonahbedouch commented Jan 29, 2024

Hi! It's currently a known bug that some browsers cannot recognize the 0.0.0.0 url. You can try manually typing in http://localhost: followed by the port that viser spits out into your browser, or you can try to utilize the shared link feature if that doesn't work.

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

Successfully merging this pull request may close these issues.

None yet

5 participants