H3-metal – Native MiniMax-H3 inference for Apple Silicon

(github.com)

288 points | by swyx 9 hours ago ago

60 comments

  • Meleagris 7 hours ago

    I've been using MiniMax H3 on my M5 Pro 64GB MacBook Pro through ComfyUI. It works extremely well.

    I had to modify the default ComfyUI workflows to use a GGUF quant (city96's ComfyUI-GGUF custom node, UnetLoaderGGUF in place of the stock loader) [0].

    I use the model labeled Q5_K_M. There is Q8_0 available as well, which is 34GB and fits fine in 64GB unified memory if you keep resolution modest.

    The main issue is speed, a ~9-second 480x864 clip at 20 steps takes me a bit over an hour. So this will be cool to try for the speed up alone.

    There's a lot of great information and workflows available to follow on the r/StableDiffusion subreddit.

    [0] https://huggingface.co/Abiray/MiniMax-H3-GGUF/tree/main/unet

    • antirez 3 hours ago

      This implementation is much faster on my M5 Max, like a few minutes for the same video, but on an M5 Max with 128GB, didn't test on M5 Pro. About memory, could be executed on 64GB with a few changes.

      • Manfrednotfunny 2 hours ago

        Memory bandwidtih between pro and max is double. 300gb/s vs. 600gb/s btw.

        • antirez 2 hours ago

          Does not matter much in this case. GPU bound.

    • alexgoodhart 5 hours ago

      I wonder how much faster your m5 pro is compared to my M1 Max @ 64gb

    • jonplackett 3 hours ago

      What is the quality of the output like compared to something like Veo?

    • Myzura 2 hours ago

      How much free space do you have left after running this llm model? Have you tried to develop your own model with the M5?

  • aaqaishtyaq 6 minutes ago

    Anyone tried it with M4 Pro, 48GB of memory?

  • antirez 4 hours ago

    In the AMA Minimax said that H3 could support sparse attention, that would be a huge speedup! I wonder if there are any news on that. H3 is very cool. EDIT: testing a --sparse-attention optional mode based on what they said in the Reddit post.

  • linzhangrun 4 hours ago

    On my 128GB M4 Max Mac Studio, generating a 15s 480p video with MiniMax H3 in ComfyUI takes an hour and a half.

    Put Codex to work on deploying it now, hoping the speed can improve quite a lot :-) Thanks anyway

    • embedding-shape an hour ago

      > On my 128GB M4 Max Mac Studio, generating a 15s 480p video with MiniMax H3 in ComfyUI takes an hour and a half.

      That's crazy, a RTX Pro 6000 does that in in 2-3 minutes (give or take, depending on your exact settings). LLMs don't make the difference between standalone GPU vs unified memory + CPU so obvious as diffusion models seems to do.

      • whywhywhywhy 40 minutes ago

        It’s always been the case, it’s more the anomaly that LLMs work at comparable speeds on M series because almost all other ML runs way faster on Nvidia cards.

    • sscarduzio 4 hours ago

      Please keep up posted about the results!

      • linzhangrun 2 hours ago

        First batch of quick test results: approximately 1/5 speed improvement

  • iamyatin 31 minutes ago

    Noob question to all, is there any open source coding model that I can run on Mac mini 16gb?

  • diddid 7 hours ago

    This is where the DGX spark makes up a bit of the ground it loses on llm work, diffusion and cuda go together like peanut butter and jelly.

    • embedding-shape an hour ago

      cough DiffusionGemma cough

      Seriously, very dumb model compared to what you can run locally, but holy moly is it FAST on one GPU, seriously impressive. Can't wait for those to be scaled up a bit to fit perfectly within 96GB VRAM, then they'll be competitive.

  • TechSquidTV 8 hours ago

    This still requires 128Gb of memory, right? Me and my lowly 96Gb, like a commoner; missing out on the fun.

    • embedding-shape an hour ago

      It shouldn't? Unless you're using BF16 for all weights (I'm using NVFP4 for the text encoder, otherwise everything BF16 (and audio F32)) you'll fit it all within 96GB VRAM, bugs non-with-standing :) I've been fitting this within 96GB VRAM without issues.

      • Arn_Thor 33 minutes ago

        *notwithstanding

        Anyway, good input!

        • embedding-shape 7 minutes ago

          I'll blame it on other book authors! :) https://en.wiktionary.org/wiki/nonwithstanding

          > This misconstruction is very common, included in print publications spanning several centuries. It might be considered an alternative spelling, albeit still a mistaken usage.

          Thanks though, I never actually knew so was helpful :)

    • thehamkercat 8 hours ago

      From README:

      > On the 128 GB M5 Max, clean end-to-end image+audio and embedded-video+audio renders completed in 74.58 and 76.99 seconds respectively, each with about a 40.1 GB peak physical footprint and zero swaps.

      Looks like it uses 40GB? So your 96GB mac setup should work fine i guess (Model itself is 33B)

      • vunderba 7 hours ago

        This repo looks neat, but I hope they add some more clear benchmarks because that time (74.58s) is pretty meaningless given that the it/s (and total time) is highly dependent on mode (T2V vs I2V vs REF2V), resolution (0.4, 0.6mp, etc), duration (5-15 seconds), etc.

    • pferdone an hour ago

      you should have a look at https://github.com/deepbeepmeep/Wan2GP which is the goto tool for "gpu poor", although as people below already pointed out you should be fine with comfyui's standard setup aswell

      • embedding-shape an hour ago

        First, I think they're not even talking about GPUs, this is macOS hardware so unified memory. Secondly, if they were talking about GPUs, then 96GB VRAM is hardly what people refer to when they say "gpu poor".

  • myshapeprotocol 2 hours ago

    Native inference optimization for Apple Silicon is such a game-changer for local-first workflows. Incredible performance work.

  • c0rruptbytes 7 hours ago

    wow antirez does not sleep

    • punnerud 5 hours ago

      Wow, had to check some of his other repos; his the one behind dump1090

    • mlmonkey 6 hours ago

      Understatement of the year :-D

    • behnamoh 6 hours ago

      when you have enough money to not have to worry about anything, you can go back to your hobbies. in this case, his hobby is programming.

      • azinman2 6 hours ago

        Being a world class talent is independent of financial situation.

        • afavour 3 hours ago

          Of course it isn’t. If you can’t afford to eat you can’t achieve any potential you might have. Financial stability is a gamechanger for everyone.

          • ionelaipatioaei 2 hours ago

            That's stupid, if you're truly talented you'll solve the financial stuff in order to pursue whatever you want to do - if you don't then that's on you.

        • moshun 3 hours ago

          “I am, somehow, less interested in the weight and convolutions of Einstein's brain than in the near certainty that people of equal talent have lived and died in cotton fields and sweatshops."— Stephen Jay Gould

        • menaerus 42 minutes ago

          To show the world you're a "world class talent", whatever that means, also suggests you would either have to be a genius or have enough resources to work on your side quests. Latter implies you're well off so, no, I don't think there's zero correlation between the two in all cases.

        • behnamoh 5 hours ago

          talent w/o financial stability is a battery w/o circuit.

      • stressback 6 hours ago

        "enough money not to worry about anything" haha

  • abhinai 8 hours ago

    How similar are Jeff Dean and Salvatore Sanfilippo?

    • onionisafruit 8 hours ago

      My favorite Jeff Dean fact is that he’s also antirez. Which reminds me of my favorite Salvatore Sanfilippo fact. He’s also Jeff Dean

      • hnfong 2 hours ago

        The claims seem fitting from a user named "onionisafruit"...

      • tomcam 6 hours ago

        I'm totally following this

      • ralusek 6 hours ago

        Is that what the identity function is?

        • silisili 5 hours ago

          It's why javascript had to add the triple equals check...

          • muragekibicho 4 hours ago

            2 is not enough. 3 verifies the Dean-Sanfilippo correspondence.

    • robotresearcher 4 hours ago

      People are really good at stuff.

      I noticed on a bar TV the other day that some of the Chromecast screensaver landscape photo credits were to Peter Norvig. They were really lovely pictures.

      • SwellJoe 3 hours ago

        I've run into Peter Norvig twice. Once at a YC event; the other when I parked my motorhome in front of his house in Palo Alto for a couple of days while visiting a friend who happened to live on the same street (not on purpose, I didn't know it was his house, it was just where I found sufficient open street parking for a huge motorhome, big houses with fewer cars on the street than on my friend's block). I ran into him while walking my dog, he asked about the motorhome and we talked travel. He was lovely both times. Not everyone is nice about a big motorhome parking on their block, especially in California, but he was friendly.

  • tipiirai 6 hours ago

    I'd love to know what the alternatives are and how this is better

    • v-mdev an hour ago

      I totally agree with you.

  • luciana1u 25 minutes ago

    neat — now I just need a machine with the memory bandwidth to render the three-second clip of my cat before the cat itself forgets what happened

  • yieldcrv 3 hours ago

    Alright I’ve been afraid to ask but have been having trouble finding

    What are some adult entertainment workflows in comfyui, I need best loras, best prompts to start with

    and the communities, are they on telegram or something?

    • antirez 44 minutes ago

      H3 is quite uncensored, but was not trained on p0rn, so it has no anatomy clues needed to generate that kind of stuff. For softer adult content it is reported to be fine on Reddit.

    • bahmboo 2 hours ago

      This is a healthy question. We want to use these tools for regular old human needs and desires.

    • Havoc 2 hours ago

      There will Reddit subs for it though couldn’t tell you which off top of my head

      I’d personally steer clear of messaging platforms for this - who knows what one might stumble into there

      • embedding-shape an hour ago

        > I’d personally steer clear of messaging platforms for this - who knows what one might stumble into there

        Personally I have no interest, but sometime browse stuff out of curiosity. But this got more of my curiosity, what kind of "stuff" are you implying they might stumble upon on the open, public internet? Sure, some NSFW, horror and otherwise weird stuff is there, especially around AI generation, but hardly something that will leave you traumatized, unless I misunderstand what you're implying?

    • pferdone an hour ago

      a friend told me there's a reddit called: unstable diffusion