Remix.run Logo
hhthrowaway1230 5 hours ago

so multiple of these browser wasm demos make me re-download the models, can someone make a cdn for it or some sort u uberfast downloader? just throw some claude credits against it ty!

wereHamster 4 hours ago | parent | next [-]

CDN wouldn't help much. These days browsers partition caches by origin, so if two different tools (running on different domains) fetch the same model from the CDN, the browser would download it twice.

cjbgkagh an hour ago | parent [-]

Did not know that. That sounds extraordinary wasteful, there must be a file hash based method that would allow sharing such files between domains.

thornewolf 33 minutes ago | parent [-]

it's a security feature. otherwise my malicious site could check for cdn.sensitivephotoswebsite.com and blackmail you if it was cached already

cjbgkagh 30 minutes ago | parent [-]

It would be nice if there was a whitelist option for non-sensitive content. I stopped using cdn links due to the overhead of the extra domain lookups but I did think that my self hosted content would be cached across domains.

embedding-shape 4 hours ago | parent | prev | next [-]

Adding a file input where users can upload files to the frontend directly from their file manager would probably work as a stop-gap measure, for the ones who want something quick that let people manage their own "cache" of model files.

logicallee 26 minutes ago | parent | prev | next [-]

>can someone make a cdn for it or some sort u uberfast downloader? just throw some claude credits against it ty!

Okay, I did so. I realize that in your later followup comment you might want something different (like for Chrome itself to cache these downloads or something) but for now I made what you asked for, here you go:

https://stateofutopia.com/experiments/ephemeralcdn/

It's an ultrafast temporary CDN for one-off experiments like this. Should be lightning fast. By including the script, you can include any file this CDN serves.

logicallee 3 hours ago | parent | prev | next [-]

Would you be okay with it using your upload at the same time, then a p2p model would work. (This is potentially a good match for p2p because edge connections are very fast, they don't have to go across the whole Internet). You could be downloading from uploaders in your region. Let me know if you would be okay with uploading at the same time, then this model works and I can build it for you for people to use this way.

Rekindle8090 5 hours ago | parent | prev [-]

What? downloaded for me at 2gbps

hhthrowaway1230 5 hours ago | parent | next [-]

Ah let me clarify, many of the in the browser demos make me download certain models even if I already have them It would be great if there was a way that I don't have to redownload them across demos so that I just have a cache. or an in browser model manager. hope this makes sense.

Or indeed use some sort of huggingface model downloader (if that exist with XET)

varun_ch 3 hours ago | parent | next [-]

I think this would sit best at the browser level. I’m not sure there’s a nice way for multiple websites to share a cache like that.

hhthrowaway1230 5 hours ago | parent | prev [-]

also maybe a good usecase to finally have P2P web torrents :)

hhthrowaway1230 5 hours ago | parent | prev [-]

Yeah that's great but I'm in a cafe outside burning my phone data. ty!