How The Image-Generating AI Of Stable Diffusion Works

[Jay Alammar] has put up an illustrated guide to how Stable Diffusion works, and the principles in it are perfectly applicable to understanding how similar systems like OpenAI’s Dall-E or Google’s Imagen work under the hood as well. These systems are probably best known for their amazing ability to turn text prompts (e.g. “paradise cosmic beach”) into a matching image. Sometimes. Well, usually, anyway.

‘System’ is an apt term, because Stable Diffusion (and similar systems) are actually made up of many separate components working together to make the magic happen. [Jay]’s illustrated guide really shines here, because it starts at a very high level with only three components (each with their own neural network) and drills down as needed to explain what’s going on at a deeper level, and how it fits into the whole.

Spot any similar shapes and contours between the image and the noise that preceded it? That’s because the image is a result of removing noise from a random visual mess, not building it up from scratch like a human artist would do.

It may surprise some to discover that the image creation part doesn’t work the way a human does. That is to say, it doesn’t begin with a blank canvas and build an image bit by bit from the ground up. It begins with a seed: a bunch of random noise. Noise gets subtracted in a series of steps that leave the result looking less like noise and more like an aesthetically pleasing and (ideally) coherent image. Combine that with the ability to guide noise removal in a way that favors conforming to a text prompt, and one has the bones of a text-to-image generator. There’s a lot more to it of course, and [Jay] goes into considerable detail for those who are interested.

If you’re unfamiliar with Stable Diffusion or art-creating AI in general, it’s one of those fields that is changing so fast that it sometimes feels impossible to keep up. Luckily, our own Matthew Carlson explains all about what it is, and why it matters.

Stable Diffusion can be run locally. There is a fantastic open-source web UI, so there’s no better time to get up to speed and start experimenting!

Look Inside This “Meditation Headband” And Integrate It Into Your Own Projects

Muse makes a variety of wearable devices aimed at measuring brain and body activity, and [Becky Stern] did a detailed teardown of the Muse S model, revealing what goes on inside the device.

The Muse S is a soft, sleep-friendly biofeedback wearable mounted on silver-plated fabric. Not only does [Becky] tear it down, but she provides loads of magnified images and even has it CT scanned. The headband has conductive fabric embedded into it, and the core of the device is stuffed with three separate PCBs that get pretty thoroughly scrutinized.

While the Muse S is sold mainly as a meditation aid and works with a companion app, there is, fortunately, no need to go digging around with a screwdriver and soldering iron to integrate it into other projects. The Muse S is supported by the Brainflow project which opens it up to different applications. Brainflow is a library intended to obtain, parse, and analyze EEG, EMG, ECG, and other kinds of data from biosensors.

If you think Muse and Brainflow sound familiar, that might be because of another project we featured that integrated a Muse 2 and Brainflow with Skyrim VR, creating a magic system whose effectiveness depends on the player’s state of mind. Good things happen when hardware and software are accessible to users, after all.

You can watch a video tour of the teardown in the video, embedded just under the page break.

Continue reading “Look Inside This “Meditation Headband” And Integrate It Into Your Own Projects”

DIY Heat-Set Insert Press Says Complicated = Comfort

Heat-set inserts are a great way to embed mechanically-strong, threaded parts into a 3D print. For installation, all that is required is an economical soldering iron; something most of us already have.

The carriage and counterweight use a v-wheel gantry, GT2 belt, and other common hardware.

That’s fine for a handful of occasional inserts, but when a large number need to be inserted reliably and cleanly, something a little more refined is called for. That’s where [virchow]’s threaded insert press design comes in. It adds 3D-printed parts to an aluminum extrusion frame to create a press that smoothly lowers a soldering iron directly up and down, with minimal effort by the user.

The holder for the soldering iron is mounted to a small v-wheel gantry that rides along the vertical extrusion. The gantry features a counterweight to take care of resetting the position of the iron. [Virchow] admits that the design could be considered unnecessarily complicated (hence the “UC” in the name) but on the other hand, there’s nothing like doing a hundred or so inserts to make one appreciate every bit of comfort and stability.

Heat-set inserts aren’t difficult to use, but a little technique goes a long way. Spend a few minutes reading Joshua Vasquez’s guide on the optimal way to use them in 3D-printed parts to make sure yours not only go in straight but end up looking great as well.

Everything You Wanted To See About Restoring A 1956 Radio

Ever wanted a good, good look at the insides of a 1950s radio, along with fantastic commentary on the internals and the purpose of various components? Then don’t miss [Adam Wilson]’s repair and restoration of a 1956 Philips 353A, a task made easier by a digitized copy of the service manual. [Adam] provides loads of great pictures, as well as tips on what it takes to bring vintage electronics back to life. What’s not to like?

Vintage electronics like this are often chock-full of components that deteriorate with age, so one doesn’t simply apply power to see if it still works as a first step. These devices need to be inspected and serviced before power is ever applied. Even then, powerup should be done with a current-controlled source that can be shut down if anything seems amiss.

Thank goodness for high quality, digitized service manuals.

Devices like these largely predate printed circuit boards, so one can expect to see plenty of point-to-point soldering. Vacuum tubes did much of the hard work, so they are present instead of integrated circuits and transistors. Capacitors in the microfarads were much larger compared to their modern equivalents, and paper/wax capacitors (literally made from rolled-up paper covered in wax) handled capacitances in the nanofarad range instead of the little ceramic disk caps of today.

One thing that helped immensely is the previously-mentioned Philips 353A service manual, which includes not only a chassis and component layout, but even has servicing procedures such as cord replacement for the tuning dial. Back then, a tuning dial was an electromechanical assembly that used a winding of cord to rotate the tuning capacitor, and replacing it was a fiddly process. If only all hardware was documented so well!

The end result looks wonderful and still has great sound. As a final tweak, [Adam] added an external audio input cable as a nod to the modern age. Now, we have in the past seen a small LED screen integrated convincingly into an antique, but in this case [Adam] kept the original look completely intact. You can see it in action, playing some Frank Sinatra in the short video embedded below.
Continue reading “Everything You Wanted To See About Restoring A 1956 Radio”

A 3D Printed Ratchet That Can Really Take The Torque

Printed tools aren’t exactly known for their durability, but [Gladius] shows us that with some thoughtful design, it’s possible to print a ratcheting wrench that can handle surprising amounts of torque.

Look closely, and you can see that the parts are almost entirely made up of perimeters (click to enlarge).

This particular wrench is inspired by NASA’s 3D printed ratcheting wrench, and also from an early 1900s design. It sports a 1/2 inch square socket into which modern adapters can be fitted, allowing those steel parts to do their job while the wrench itself delivers the muscle.

[Gladius] found that the strongest results came from slicing parts — especially the handle — so that they come out consisting almost entirely of perimeters, with virtually no traditional infill. Want to know more? There’s a discussion on reddit where [Gladius] goes into added detail about measurements and performance.

Over the years, we’ve seen our share of powerful prints. For example, what the Crimson Axlef*cker can do looks downright intimidating. Speaking of printing things that move, we want to remind you about this handy tip for easily and reliably joining motor shafts to printed parts by (mis)using jaw couplings.

3D Printed Sorter Separates Spare Hex Nuts With A Shake

Got a pile of mixed hex nuts? Sort them in no time by printing [jonafriendj]’s nut sorter, which has options for pretty much any nut size you’d be after (it’s labeled metric, but actually includes Imperial sizes as well.)

Something to admire about the design is the handy little raised labels on each of the sieves, and the fact that all the parts print entirely without supports. Designing a part to play to a manufacturing method’s strengths (and avoid its weaknesses) is good DFM, or Design for Manufacturing.

With 3D printing being the boon that it is to workshops and hobbyists everywhere, it certainly pays to strive for good DFM, especially for designs meant to be shared with others. Sometimes good DFM takes a page from other manufacturing methods like injection molding, and we end up with things like using crush ribs on printed parts.

Want to see a demonstration of [jonafriendj]’s nut sorting design? Check out the short video embedded below the page break. If that leaves you wanting, take a look at a motorized, automated DIY solution.

Continue reading “3D Printed Sorter Separates Spare Hex Nuts With A Shake”

Toilet Paper Tube Pulls Dissolved Resin From IPA, Cures It For Disposal

SLA 3D printing with resin typically means rinsing parts with IPA (isopropyl alcohol). That process results in cloudy, used IPA containing a high concentration of dissolved resin. The dual goals of cleaning and reusing IPA are important ones, and we have to say, [Jan Mrázek]’s unusual experiment involving a UV source and slowly-rotating paper tube to extract and cure dissolved resin might look odd, but the results are definitely intriguing.

Dissolved resin successfully pulled from IPA and cured onto a cardboard roll. This particular one rotated a bit too quickly, trapping IPA in the curing process and yielding a slightly rubbery wad instead of a hard solid.

The best way to dispose of liquid resin is to cure it into a solid, therefore making it safe to throw away. But what about resin that has been dissolved into a cleaning liquid like IPA? [Jan] felt that there was surely a way to extract the dissolved resin somehow, which would also leave the IPA clean for re-use. His solution? The device shown here, which uses a cardboard tube to pull dissolved resin from an IPA bath and a UV source to cure it onto the tube.

Here’s how it works: the tube’s bottom third sits in dirty IPA, and UV LEDs shine on the top of the tube. The IPA is agitated with a magnetic stirrer for best results. A motor slowly rotates the cardboard tube; dissolved resin gets on the tube at the bottom, UV cures it at the top, and the whole thing repeats. Thin layers of cured resin slowly build up, and after long enough, the roll of cured resin can be thrown away and the IPA should be clean enough for reuse.

So far it’s a pretty successful test of a concept, but [Jan] points out that there are still some rough edges. Results depend on turning the tube at a good rate; turning it too quickly results in IPA trapped with the cured residue. On the plus side, the UV source doesn’t need to be particularly powerful. [Jan] says that Ideally this would be a device one could run in a sealed container, cleaning it over one or two days.

Resin printing is great, but it’s a messy process, so anything that makes it less wasteful is worth checking out. Got any ideas for improving or building on this concept? If so, don’t keep ’em to yourself! Let us know in the comments.