Can you run it on mac?
Is mac supported for inference?
Ive tried running it using https://github.com/kijai/ComfyUI-HunyuanVideoWrapper/tree/main but kept running into mps issues. So as far as I'm aware not yet. However, https://github.com/BoBo0037/bobo-fun shows promise of supporting it on mac.
Is mac supported for inference?
yes technicality speaking, if you have over 90 gb of ram. but it will maybe take one day to generate a single video as the most tops an apple gpu has is 17 tops while an h100 has 204.9 TFLOPS
TLDR:
yes technicality speaking but very slow to run
I'd love to see MPS support on this model (https://developer.apple.com/documentation/metalperformanceshaders)
For example, M4 Max completes images at a 32-bit quant in under 4 minutes for black-forest-labs/FLUX.1-dev
I'd love to see MPS support on this model (https://developer.apple.com/documentation/metalperformanceshaders)
For example, M4 Max completes images at a 32-bit quant in under 4 minutes for black-forest-labs/FLUX.1-dev
A image model is a bit different than a video model
Successfully ran this on an 128GB M3 Max at work today.
This setup worked without issues (https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/)
~155s/it @ 100% GPU and ~100GB (V)RAM = 60-ish minutes for 73 frames (VAE decode took a few minutes, too).
Edit: 848x480
Successfully ran this on an 128GB M3 Max at work today.
This setup worked without issues (https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/)~155s/it @ 100% GPU and ~100GB (V)RAM = 60-ish minutes for 73 frames (VAE decode took a few minutes, too).
Edit: 848x480
that's fast
FYI Tried it, but crashed after 54 minutes at 100% GPU and 128GB (V)RAM – it doesn't really seem faster than my comfyui setup.
2024-12-24 01:55:39.170 | INFO | hyvideo.diffusion.pipelines.pipeline_hunyuan_video:call:768 - Target latents shape: (1, 16, 13, 68, 120)
2024-12-24 02:49:26.550 | ERROR | hyvideo.diffusion.pipelines.pipeline_hunyuan_video:call:806 - Error in VAE decoding chunk 0: expected np.ndarray (got list)
/HunyuanVideo_MLX/hyvideo/vae/mlx_vae.py", line 74, in decode z = torch.from_numpy(z.astype(mx.float32).tolist())
that's fast
Is it? I only have LTXVideo for comparison atm – while quality seems lower (or harder to achieve?), it's about 10x faster.
Anyone any luck yet with https://github.com/kijai/ComfyUI-HunyuanVideoWrapper/tree/main? I also run into MPS issues in the HunyuanVideo Sampler node...
I tried bobo-fun and it loads and runs, but I get a memory error. Guess my M1 Max 64 Gb is not beefy enough. But I'm not sure if it's trying to use the newer lighter weights or not.
Edit: when I reduce the resolution and the #frames it works!
I have an M2 Max pro, 38 or 32 vram (New to mac so I get confused on how specs are displayed) but the following workflow worked for me. It used up to 31 ram but mostly 30.: (.json file) {"last_node_id":88,"last_link_id":235,"nodes":[{"id":22,"type":"BasicGuider","pos":[46.29969024658203,-575.3177490234375],"size":[222.3482666015625,46],"flags":{},"order":13,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":195,"slot_index":0,"localized_name":"model"},{"name":"conditioning","type":"CONDITIONING","link":129,"slot_index":1,"localized_name":"conditioning"}],"outputs":[{"name":"GUIDER","type":"GUIDER","links":[30],"slot_index":0,"shape":3,"localized_name":"GUIDER"}],"properties":{"Node name for S&R":"BasicGuider"},"widgets_values":[]},{"id":26,"type":"FluxGuidance","pos":[-198.55087280273438,-464.2391662597656],"size":[317.4000244140625,58],"flags":{},"order":12,"mode":0,"inputs":[{"name":"conditioning","type":"CONDITIONING","link":175,"localized_name":"conditioning"}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[129],"slot_index":0,"shape":3,"localized_name":"CONDITIONING"}],"properties":{"Node name for S&R":"FluxGuidance"},"widgets_values":[7],"color":"#233","bgcolor":"#355"},{"id":45,"type":"EmptyHunyuanLatentVideo","pos":[-827.071533203125,350.4422912597656],"size":[315,130],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[180],"slot_index":0,"localized_name":"LATENT"}],"properties":{"Node name for S&R":"EmptyHunyuanLatentVideo"},"widgets_values":[736,464,73,1]},{"id":25,"type":"RandomNoise","pos":[-464.6786804199219,256.5759582519531],"size":[315,82],"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"NOISE","type":"NOISE","links":[37],"shape":3,"localized_name":"NOISE"}],"properties":{"Node name for S&R":"RandomNoise"},"widgets_values":[278946963789289,"randomize"],"color":"#2a363b","bgcolor":"#3f5159"},{"id":83,"type":"VAEDecode","pos":[-353.49176025390625,-17.180084228515625],"size":[210,46],"flags":{},"order":16,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":223,"localized_name":"samples"},{"name":"vae","type":"VAE","link":222,"localized_name":"vae"}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":null,"localized_name":"IMAGE"}],"properties":{"Node name for S&R":"VAEDecode"},"widgets_values":[]},{"id":16,"type":"KSamplerSelect","pos":[-834.9149169921875,216.1068115234375],"size":[315,58],"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[{"name":"SAMPLER","type":"SAMPLER","links":[19],"shape":3,"localized_name":"SAMPLER"}],"properties":{"Node name for S&R":"KSamplerSelect"},"widgets_values":["euler"]},{"id":17,"type":"BasicScheduler","pos":[-304.72125244140625,-201.8907012939453],"size":[315,106],"flags":{},"order":6,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":217,"slot_index":0,"localized_name":"model"}],"outputs":[{"name":"SIGMAS","type":"SIGMAS","links":[20],"shape":3,"localized_name":"SIGMAS"}],"properties":{"Node name for S&R":"BasicScheduler"},"widgets_values":["beta",12,1]},{"id":67,"type":"ModelSamplingSD3","pos":[-311.5863952636719,-580.2339477539062],"size":[210,58],"flags":{},"order":10,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":227,"localized_name":"model"}],"outputs":[{"name":"MODEL","type":"MODEL","links":[195],"slot_index":0,"localized_name":"MODEL"}],"properties":{"Node name for S&R":"ModelSamplingSD3"},"widgets_values":[17]},{"id":10,"type":"VAELoader","pos":[-812.6895751953125,80.73226165771484],"size":[350,60],"flags":{},"order":3,"mode":0,"inputs":[],"outputs":[{"name":"VAE","type":"VAE","links":[211,222],"slot_index":0,"shape":3,"localized_name":"VAE"}],"properties":{"Node name for S&R":"VAELoader"},"widgets_values":["hunyuan_video_vae_bf16.safetensors"]},{"id":44,"type":"CLIPTextEncode","pos":[-788.7909545898438,-543.5287475585938],"size":[428.65301513671875,165.28106689453125],"flags":{},"order":11,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":225,"localized_name":"clip"}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[175],"slot_index":0,"localized_name":"CONDITIONING"}],"title":"CLIP Text Encode (Positive Prompt)","properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["Anne Hathaway as Catwoman, dressed in a sleek black catsuit with a tactical utility belt, standing on a Gotham City rooftop at night, holding a cup of coffee, ultra-realistic, 4K resolution, highly detailed textures, natural brown eyes, no blue eyes, dramatic city skyline with neon lights, moody atmosphere, cinematic lighting, confident and mysterious expression, realistic skin and fabric details."],"color":"#232","bgcolor":"#353"},{"id":13,"type":"SamplerCustomAdvanced","pos":[-214.41571044921875,448.25848388671875],"size":[272.3617858886719,124.53733825683594],"flags":{},"order":14,"mode":0,"inputs":[{"name":"noise","type":"NOISE","link":37,"slot_index":0,"localized_name":"noise"},{"name":"guider","type":"GUIDER","link":30,"slot_index":1,"localized_name":"guider"},{"name":"sampler","type":"SAMPLER","link":19,"slot_index":2,"localized_name":"sampler"},{"name":"sigmas","type":"SIGMAS","link":20,"slot_index":3,"localized_name":"sigmas"},{"name":"latent_image","type":"LATENT","link":180,"slot_index":4,"localized_name":"latent_image"}],"outputs":[{"name":"output","type":"LATENT","links":[210,223],"slot_index":0,"shape":3,"localized_name":"output"},{"name":"denoised_output","type":"LATENT","links":null,"shape":3,"localized_name":"denoised_output"}],"properties":{"Node name for S&R":"SamplerCustomAdvanced"},"widgets_values":[]},{"id":73,"type":"VAEDecodeTiled","pos":[-81.12609100341797,25.529111862182617],"size":[210,150],"flags":{},"order":15,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":210,"localized_name":"samples"},{"name":"vae","type":"VAE","link":211,"localized_name":"vae"}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[229],"slot_index":0,"localized_name":"IMAGE"}],"properties":{"Node name for S&R":"VAEDecodeTiled"},"widgets_values":[128,64,64,8]},{"id":86,"type":"SaveAnimatedWEBP","pos":[207.47267150878906,-345.60284423828125],"size":[762.7867431640625,627.7677001953125],"flags":{},"order":17,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":229,"localized_name":"images"}],"outputs":[],"properties":{"Node name for S&R":"SaveAnimatedWEBP"},"widgets_values":["ComfyUI",24,true,90,"default"]},{"id":11,"type":"DualCLIPLoader","pos":[-1830.8441162109375,-627.4357299804688],"size":[350,106],"flags":{},"order":4,"mode":0,"inputs":[],"outputs":[{"name":"CLIP","type":"CLIP","links":[230],"slot_index":0,"shape":3,"localized_name":"CLIP"}],"properties":{"Node name for S&R":"DualCLIPLoader"},"widgets_values":["clip_l.safetensors","llava_llama3_fp8_scaled.safetensors","hunyuan_video","default"]},{"id":87,"type":"Lora Loader","pos":[-1845.5833740234375,-264.51739501953125],"size":[315,146],"flags":{},"order":7,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":231,"localized_name":"model"},{"name":"clip","type":"CLIP","link":230,"localized_name":"clip"}],"outputs":[{"name":"MODEL","type":"MODEL","links":[234],"localized_name":"MODEL"},{"name":"CLIP","type":"CLIP","links":[235],"slot_index":1,"localized_name":"CLIP"},{"name":"NAME_STRING","type":"STRING","links":null,"localized_name":"NAME_STRING"}],"properties":{"Node name for S&R":"Lora Loader"},"widgets_values":["._Hunyuan.bl0wj0b-4_60.safetensors",0.8,1]},{"id":88,"type":"Lora Loader","pos":[-1489.51318359375,-232.35848999023438],"size":[315,146],"flags":{},"order":8,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":234,"localized_name":"model"},{"name":"clip","type":"CLIP","link":235,"localized_name":"clip"}],"outputs":[{"name":"MODEL","type":"MODEL","links":[232],"slot_index":0,"localized_name":"MODEL"},{"name":"CLIP","type":"CLIP","links":[233],"slot_index":1,"localized_name":"CLIP"},{"name":"NAME_STRING","type":"STRING","links":null,"slot_index":2,"localized_name":"NAME_STRING"}],"properties":{"Node name for S&R":"Lora Loader"},"widgets_values":["cartoon_Hunyuan60epoch.safetensors",0.8,1]},{"id":84,"type":"LoraLoader","pos":[-1134.72607421875,-220.90057373046875],"size":[315,126],"flags":{},"order":9,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":232,"localized_name":"model"},{"name":"clip","type":"CLIP","link":233,"localized_name":"clip"}],"outputs":[{"name":"MODEL","type":"MODEL","links":[227],"slot_index":0,"localized_name":"MODEL"},{"name":"CLIP","type":"CLIP","links":[225],"slot_index":1,"localized_name":"CLIP"}],"properties":{"Node name for S&R":"LoraLoader"},"widgets_values":["BlackAnimatedFemaleEpoch60.safetensors",0.4,1]},{"id":78,"type":"UnetLoaderGGUF","pos":[-1324.5029296875,-721.8895263671875],"size":[452.9647521972656,102.5237045288086],"flags":{},"order":5,"mode":0,"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[217,231],"slot_index":0,"localized_name":"MODEL"}],"properties":{"Node name for S&R":"UnetLoaderGGUF"},"widgets_values":["fast-hunyuan-video-t2v-720p-Q4_K_S.gguf"]}],"links":[[19,16,0,13,2,"SAMPLER"],[20,17,0,13,3,"SIGMAS"],[30,22,0,13,1,"GUIDER"],[37,25,0,13,0,"NOISE"],[129,26,0,22,1,"CONDITIONING"],[175,44,0,26,0,"CONDITIONING"],[180,45,0,13,4,"LATENT"],[195,67,0,22,0,"MODEL"],[210,13,0,73,0,"LATENT"],[211,10,0,73,1,"VAE"],[217,78,0,17,0,"MODEL"],[222,10,0,83,1,"VAE"],[223,13,0,83,0,"LATENT"],[225,84,1,44,0,"CLIP"],[227,84,0,67,0,"MODEL"],[229,73,0,86,0,"IMAGE"],[230,11,0,87,1,"CLIP"],[231,78,0,87,0,"MODEL"],[232,88,0,84,0,"MODEL"],[233,88,1,84,1,"CLIP"],[234,87,0,88,0,"MODEL"],[235,87,1,88,1,"CLIP"]],"groups":[{"id":1,"title":"Hunyuan GGUF + Lora","bounding":[-924.5453491210938,-731.2146606445312,1916.5833740234375,1375.4254150390625],"color":"#3f789e","font_size":24,"flags":{}}],"config":{},"extra":{"ds":{"scale":0.5042123680313434,"offset":[1720.6801965575771,805.3104079945214]},"groupNodes":{},"node_versions":{"comfy-core":"0.3.12","was-node-suite-comfyui":"056badacda52e88d29d6a65f9509cd3115ace0f2","ComfyUI-GGUF":"5875c52f59baca3a9372d68c43a3775e21846fe0"},"ue_links":[],"VHS_latentpreview":false,"VHS_latentpreviewrate":0},"version":0.4}
(M1 Max 64Gb Mac) I gave up on bobo-fun and installed comfyui. Works great!