Skip to main content
View on YouTube to comment and like!

Syntax Video

what if websites were felt?

Chapter 1 0:00

Text In, Pixels Out!

text in pixels out. That's what they're saying. One of the craziest things I've heard about user interfaces is that we are simply going to give a prompt and out the other end is going to come a video of the interface and that's what we're going to use to interact with every single interface going forward. Right? There is no DOM, there is no elements, there's no buttons, everything. It's just a prompt that streams out a video. Now, I'm a little bit skeptical on this, but I did do some cool experiments, and the tech is a little bit further ahead than I actually thought. I'm beautiful. Look at me. So, humor me for a second while we look into this. The web is in a bit of a weird space right now. The user interface of the web, which is how we interact with computers, is sort of up for debate. Some people are saying chat is the final interface and everything will be done through a single chat. Some people think it will be generated on demand because the user knows best what they want to see. Now, this is not the first time we've seen the user interface of the web go up for debate. We've seen many things come and

Chapter 2 0:30

The Future of Interfaces

go. Mobile was a huge one that sort of stuck around. We've seen voice come in as an interface that people thought you are now going to be shopping with your voice and that has caught on for things like smart home and and quick lookups, but it has not really caught on for doing our day-to-day business. Some interfaces have been totally hyped up, but have yet to see mass adoption. What would on demand actually look like? I built three different things and I was shocked at in some parts of how close we actually are to this and other parts of how hilariously far apart and how expensive the stuff actually is. The first thing that I built was this webcam transformer because if you know me, I cannot [music] resist doing a fun webcam demo, right? So, what I did is I'm streaming in my webcam and then I'm parsing it in real time through to an LLM to to transform that image. And some of them look kind of cool, right? Like the Lego one looks really cool. Or if we were to do an oil painting of myself [laughter]

Chapter 3 1:27

Demo 1: Webcam Transformer

cyber punk. Oo, that looks actually kind of cool. I did take it a step further and made a finger frame, which is kind of cool. So it'll This one uses a library called Media Pipe and will track where your fingers are and builds a frame on top of it. If I don't go behind my microphone here. And for some of you gooners, you can actually see what I look like as a woman, which is absolutely hilarious. [laughter] Now, all of these examples that I'm showing you are using what's called imageto image transforms, meaning that you you have an LLM, you pipe in an image, you give it a prompt, and out the other end, it's going to deliver you what the image is that you that they think you want. Right now, typically, these would be way way too slow because uh it would takes, I don't know, 7 8 9 seconds and you would have to do the transform after the fact. However, Black Forest Labs came out with this Flux 2 Klein 4B, which is a distilled model that delivers results in as low as under a second. Meaning that if you are running multiple of these at a single

Chapter 4 2:20

Models + How it work

time, you starts to get into the realm of being able to feed it single frames of your video and then just pipe those into your video in real time. all of these demos. I'm just this is coming straight off of my webcam and I'm piping it in to there which is really cool. So that model works really well. And then fal.ai AI which is a website has taken this model and gives you what's called a real time endpoint which is instead of me doing I don't know what I'm getting here maybe maybe 15 20 frames a second instead of doing 15 20 requests every single second you open up a websocket connection to fal and it we simply just are you're just piping in frames as fast as you possibly can and it's returning them to you as fast as it possibly can.

I'm assuming what it's doing is it's spinning up multiple um serverless functions or multiple instances of inference so that it can handle all of those concurrently at the same time. These are openweight models meaning you can run them yourselves on consumer grade hardware. On my MacBook Pro I have an M1 64 gig pro Mac so couple years old but the best you could possibly buy a couple years ago and that take one frame takes 15 seconds to return. And so it's this is not something that you could probably run on your computer unless you have some sick graphics card um that is able to keep up with all the requests.

Chapter 5 3:55

Speed + Performance

So you do still need to shell that out to some sort of hardware provider. Once I had the video done, I thought, can this also be applied to user interface, right? Not just a webcam, but a user interface. And I saw this tweet from Ryan Stefen who did exactly that. he was piping this into the foul realtime API and he's getting relatively fast performance in real time. So here I have on the left I have the actual DOM and on the right I have the frames of that DOM being parsed in real time, right? So I can change any of these. I can drag and drop the actual interface and then [snorts] these can be done with anything, right? Like you can what would this look like if it were knitted? What would it look like if it was a paper diarama? Let's look at retro futurist pizza [laughter] plushy. There's some really fun stuff you can do with it. uh when you check things as you move it over. I can even overlay them on top of each other and use my mouse as if I was doing these.

Chapter 6 4:28

Demo 2: Realtime UI Diffusion

Look at this. I select the text and this is where I got thinking like, wow, like maybe we really aren't that far off from being able to generate your UI in real time or at least being able to use this to generate assets for your website. Now, of course, this is a silly example, but if I were to also inspect element on this, look at what we have here. This is a regular DOM. This is using a proposal to the browser called HTML in canvas.

Chapter 7 5:35

HTML in Canvas

Here I have a canvas element. And when you put HTML inside of a canvas element, you're able to take what the the browser thinks should be rendered out and paint that to the canvas. Then you have all of the pixels for the canvas and you can do whatever you want with them. In this case, I'm taking all the pixels. I'm sending them off to this file diffusion real time and it's bringing it back to me with the real time thing. So, it's kind of interesting where like maybe the future is maybe not no elements at all, but very plain looking elements and then for you to actually add a layer of styling on top. Maybe you could just be prompting this type of thing in real time. It's very, very fun. I added some kind of cool sound effects as well, which makes me very happy to use this.

Highlighting the text one makes me probably the most happy. Hopefully, you are thinking, Wes, make that a Chrome extension. I want the entire internet to be cozy felt. And that's kind of what I did. I modified the camera to also take in a screen share. And that way I can visit websites, right? I can uh visit Twitter and scroll through Twitter. I can visit my own personal website. And it's I I just I absolutely love this. I know that it's not very practical, but watching a YouTube video of one of us and having it rendered out in felt in real time is just absolutely awesome, right? Uh road map. What if everybody were cheese? [laughter] The Fisher Price rendering out, right?

Chapter 8 6:30

Demo 3: Applying to other websites

Chapter 9 6:30

Demo 3: Applying to other websites

What What does Twitter look like? Fisher Price not as good. My personal website looks very nice as Fisher [music] Price. Now, I'm sure you're wondering about cost of this. So, here's an example. This one was 60 seconds of me streaming in video and that costs about 12. And the more frames that you send it, the more it's going to cost, right? It's not just simply pure amount of times. It's how many requests are you sending it over the websocket? And in my experimenting, I blew about $20 on this.

Chapter 10 7:19

Cost

It costs about $6 or $7 per hour of video. And at that, you can at best get about 20 frames a second return to you. So, not nearly as good as you might think it is, but also kind of amazing that you can even do this and that they're able to return the frames in as fast as they can. Now, obviously, there's some shortcomings to this.

Obviously, it's a little bit laggy and there's going to be issues with accessibility and all of that type of stuff. And even though a lot of the stuff is very accessible, you're probably not going to be deploying this tomorrow to your website. This is probably not something you want to do. But it is interesting to look into what the future of interfaces might be. Don't be romantic about what technology you actually like to use. Focus on what is actually useful to your users. Is a felt-based website useful to your user?

Chapter 11 8:00

Shortcomings

Probably not. But is it fun to look into this? This hopefully will spark ideas of maybe what is to come. We're in a very experimental phase of web development right now and it's never been easier to build prototypes, even if they are as stupid as this. But I would encourage you to explore and let me know what you make because there's certainly some better ideas than the stupid stuff I've been

Quote it with credit and a link. Quoting Syntax