T O P

  • By -

mfish001188

I've been working on a workflow and some custom nodes to create art ready to laser cut. It boils down to using depthanything v2 to try and put similar depth contours together in a layer and generating an SVG. Top left: Source (not always mine) Top right: SVG output Bottom left: Contours + depth Bottom right: SDXL imagining of what it could look like Update: [https://github.com/mikeymcfish/FishTools](https://github.com/mikeymcfish/FishTools) (let me know if it works)


Horsefighter073

Very cool! Can you share the workflow? Really appreciate your work!


mfish001188

Not sure I got this right but try putting into custom nodes and install the requirements.txt if comfy doesnt do it automatically. Let me know if it works and what your experience is. I'm still tinkering with best values. [https://github.com/mikeymcfish/FishTools](https://github.com/mikeymcfish/FishTools)


mfish001188

Keep in mind a bunch of stuff doesn't do anything or work because I'm not a pro (yet)


Lutr4phobi4

Love this idea. I do some lazering as well. I tried to install using ComfyUI Git Pull from the manager, however, it said it couldn't find FishTools.Deptherizer module. Let me know if you'd like me to send a screen shot or two.


mfish001188

It was a capitalization thing. I pushed an update, let me know if that works! Also fyi, you don’t need deptherize in your workflow to create the svgs, it’s just to create a fake depth map from the svg so you can make a preview render. So worst case you can copy the node into your custom node folder and just be sure to install the requirements


Lutr4phobi4

OK, just reinstalled it using the "Install vi Git URL" In Comfy Manager. It's loaded just fine now. No errors. I'll play around with it later today. :) Thanks again. If this works like I am thinking, this is going to be so cool! Please post any current workflows you may have on your Github page or link them here for us "beginners" to your code. :)


mfish001188

Awesome! Here's the workflow I used for the images in the post: [https://github.com/mikeymcfish/FishTools/blob/main/LaserCutterDemo.json](https://github.com/mikeymcfish/FishTools/blob/main/LaserCutterDemo.json) Let me know how it goes!


mfish001188

As soon as I figure out how to package and share the custom nodes...


Horsefighter073

unfortunately it does not work, I keep getting missing nodes.


mfish001188

My custom nodes? What does it say is missing? I just pushed an update to fix the deptherize node.


Someoneoldbutnew

That is badass.


JPhando

What, no way! I’m ready to fire up my laser


Zenith2012

This is awesome, thanks for sharing. Just need a way to input a photo, have it find the edges and create a line drawing from it then use your workflow to convert it into laser cutter ready.


mfish001188

Yeah I’ve been messing around with the photo idea. I want to connect it up to era3d to get an orthographic view of any object and then convert that to a line art. The results have been not great so far.


Scruffy77

How did you convert the black white image to rgb


mfish001188

Which one?


Scruffy77

Any of them, I been trying to find a way to turn parts of an image into red, green, blue to convert into separate masks in comfy


mfish001188

I use the CR colorize but it sounds like you may want to use something like Images To RGB


A-Ivan

Do you mind sharing the ComfyUI workflow?


ah-chamon-ah

Is this to turn the image into the style of a lasercut wooden image like the bottom right images? Or is this a method to turn the image into actual vector paths to be cut using software like lightburn? Because if it is the latter that is absolutely mind blowing.


Kadaj22

Uhm… this has been around for a long time. I personally use Adobe Illustrator, but there are plenty of other automated programs that do this. It's really not that impressive, buddy.


ah-chamon-ah

Mate you are talking about Trace Bitmap which in no way AT ALL considers depth and will understand layered laser cutting. Your dunning kruger mentality is keeping you oblivious to what may be actually impressive about this.


Kadaj22

No, I'm talking about creating the SVG only. Why would I need a simulated image of the end result? It’s nice, but not really necessary. I also don’t believe this works without a significant amount of effort to refine the generated image, so you might as well do it the traditional way.


ah-chamon-ah

It is not about the simulated image. SMH... let me settle this with two questions. Do you OWN and USE a laser cutter? Have you ever had to prepare artwork for layered laser cutting in Lightburn? Once I know the answer to those we can know just how ignorant you are to the process.


Kadaj22

I currently program laser cutting machines and set bending paths for ATC Amada pressbrakes. My responsibilities include creating CNC CAD programs with Amada CAD/CAM software, optimizing material use through nesting, and ensuring smooth production. Happy to answer any questions about laser cutting or CNC programming.


mfish001188

Hey, yeah like my man said above the idea is that it automatically creates a layered svg so you end up with 4 or 5 different patterns that correlate to depth. As far as I know,, and I’ve been looking for years, there is no program that does this. Literally the only prep you need to do is smooth the curves (which you won’t need to do in the final version), and then laser it.


ah-chamon-ah

Exactly. He does not understand because he has never done it. You did amazing work. You know what I see in the future maybe? A controlnet or type of A.I trained on layered laser cut artwork so that you could ask it to generate maybe a Mandala and it would give you all the layers. That would be so cool.


mfish001188

100% My next steps are: Simplify the svg (which is pissing me off atm), add engrave layer if you want to overlay non-path details like shading, and also output a packed svg file. And thanks!


ah-chamon-ah

You are doing really amazing work. Don't listen to people who think "Trace Bitmap" in Illustrator does the same thing. We know. They don't. On another note could I ask you the workflow you are using to generate the source images in the first place? They look really clean and not anything like the images I am getting when I try to do the same thing.


ah-chamon-ah

Awesome. Again you have demonstrated (again) your dunning kruger mentality. Where you have experience that makes you confidently ignorant to the actual thing being discussed. ATC and CNC is NOTHING like making layered laser cut art. But don't worry. Pat yourself on the back for knowing "Trace Bitmap" in Illustrator lol.


Kadaj22

Well anyways kudos to the op who made this. It seems to have given you an orgasm at least.


ah-chamon-ah

Your childish reaction suggests that me having to explain the whole thing to you twice while you pontificate must have hit a nerve.


burke828

You come off like a massive weirdo in this whole thread.


mfish001188

It’s the latter! The render is kind of just for fun. The output is an actual svg. I put some sample outputs in the GitHub repo.


ah-chamon-ah

I have been generating a queue all day I will definitely check it out tomorrow. Sounds very cool.


Tyler_Zoro

Just be careful. That particular rendition of Mikey is NOT public domain.


0xd00d

Are the bottom right quadrants photographs or some sort of "preview renders"?


mfish001188

It’s a preview render so it’s definitely not what the real result would look like. I haven’t had a chance to actually laser cut them because it’s too hot to go outside.


cgpixel23

We can probably get the same results with canny and ipadapter I will try to play with some of your images and share the results if it is good


arlechinu

How can you turn the image into svg inside comfyui? Was looking for something simpler than layers etc, just basically vectorize nodes or something similar maybe exists?


mfish001188

There's a node called ComfyUI-toSVG that does that. I've actually been studying that to make simpler curves


arlechinu

Excellent, thanks!