diff --git a/es/tutorials/video/minimax/minimax-h3-fastvideo.mdx b/es/tutorials/video/minimax/minimax-h3-fastvideo.mdx index a575be5137..0dadd530c0 100644 --- a/es/tutorials/video/minimax/minimax-h3-fastvideo.mdx +++ b/es/tutorials/video/minimax/minimax-h3-fastvideo.mdx @@ -138,4 +138,4 @@ Ambos flujos de trabajo FastH3 comparten estos nodos con la configuración base - **ComfyMathExpression**: convierte la entrada de duración en una `length` de fotogramas válida en la cuadrícula de 17k+5 a 24fps - **Sampler**: sampler `res_multistep` con el scheduler `simple` a 8 pasos -Los pesos de FastH3 incluyen capas de compuerta `to_gate_compress`, que VSA lee para su rama gruesa. Los checkpoints base de H3 no las tienen. Para comparar métodos, establece `method` en `sol-attn` en el nodo **Model Sparse Attention** y mantén la misma seed. `sol-attn` no necesita pesos coincidentes y se ejecuta en cualquier checkpoint H3 con el `tau` que establezcas. Consulta [atención dispersa](/es/tutorials/video/minimax/minimax-h3#acelerar-la-generación-con-atención-dispersa) en la página base de H3. +Los pesos de FastH3 incluyen capas de compuerta `to_gate_compress`, que VSA lee para su rama gruesa. Los checkpoints base de H3 no las tienen. Para comparar métodos, establece `method` en `sol-attn` en el nodo **Model Sparse Attention** y mantén la misma seed. `sol-attn` no necesita pesos coincidentes y se ejecuta en cualquier checkpoint H3 con el `tau` que establezcas. diff --git a/es/tutorials/video/minimax/minimax-h3-prompt-guide.mdx b/es/tutorials/video/minimax/minimax-h3-prompt-guide.mdx index a40b226850..2a9accf37c 100644 --- a/es/tutorials/video/minimax/minimax-h3-prompt-guide.mdx +++ b/es/tutorials/video/minimax/minimax-h3-prompt-guide.mdx @@ -37,7 +37,7 @@ Escribe los prompts en **inglés**. Los diálogos y las letras de canciones van 1. **Primero la escena**: la escena general, luego los planos cronometrados dentro de `[Shot 1]` de `integrated_multimodal_description` 2. **Un solo bloque**: planos, cámara y audio juntos -3. **Resolución**: nativa **1344×768** en 16:9; múltiplos de **32** ([detalles](/es/tutorials/video/minimax/minimax-h3#setting-the-output-resolution)) +3. **Resolución**: nativa **1344×768** en 16:9; múltiplos de **32** 4. **Longitud**: `length` son fotogramas a 24fps (predeterminado **124** ≈ 5s), ajustado a **17k+5** 5. **Texto en pantalla**: comillas dobles en inglés para cada cadena, literal (p. ej., `A red neon sign reading "营业中"`). Las líneas habladas usan ``, no comillas 6. **Marcadores de audio de R2V**: en el análisis de retención, marca cada referencia de audio como `fully_copy`, `partially_copy`, `reference` o `weak_reference` según cómo se use el clip (consulta la tabla de la guía oficial de referencias) diff --git a/es/tutorials/video/minimax/minimax-h3.mdx b/es/tutorials/video/minimax/minimax-h3.mdx index cf96b9cb2c..d24068dae4 100644 --- a/es/tutorials/video/minimax/minimax-h3.mdx +++ b/es/tutorials/video/minimax/minimax-h3.mdx @@ -1,39 +1,20 @@ --- title: "Guía de generación de video con MiniMax H3 en ComfyUI" -description: "Usa MiniMax H3 de pesos abiertos en ComfyUI: flujos de texto a video, imagen a video y referencia a video con audio estéreo nativo y Sage Attention." +description: "Usa MiniMax H3 de pesos abiertos en ComfyUI: flujos T2V, I2V y R2V con audio estéreo nativo y enlaces a las guías detalladas." sidebarTitle: "Descripción general" -translationSourceHash: 6baf68cb +translationSourceHash: d65cf3e6 translationFrom: tutorials/video/minimax/minimax-h3.mdx translationBlockHashes: - "_intro": 94f54ee8 + "_intro": f7f0c886 "Key features": 8ca92280 - "Getting started": eed90954 - "Choosing the checkpoint precision": 4a53fdf9 - "Workflow index": bdc3b9f8 - "Setting the output resolution": db770c15 - "Clip length": d9104665 - "Step count": d2a8a6f8 - "Sampler and scheduler": 79c739c3 - "Speeding up generation with Sage Attention": 24cc9a70 - "Speeding up generation with sparse attention": cd054e87 - "Commercial licensing": 201e2de5 + "Choosing a template Workflow": 6dffc9b6 + "Commercial licensing": 3b2a9c1c --- -import UpdateReminder from "/snippets/es/tutorials/update-reminder.mdx"; [MiniMax H3](https://www.minimax.io/blog/minimax-h3) es el modelo omni-modal de pesos abiertos de MiniMax. Comprende texto, imágenes, video y audio en un solo contexto, y genera video con **audio estéreo nativo** (voz, efectos de sonido y música en una sola pasada). Los pesos abiertos apuntan a cerca de 1 megapíxel (768 px en el lado corto) a 24 fps, durante un máximo de ~15 segundos. 2K es una salida del servicio alojado y requiere un paso de upscale aparte en ComfyUI. -La documentación se reparte en seis páginas: - -- **Descripción general** (esta página): capacidades, checkpoints, índice de flujos de trabajo, resolución, duración del clip, pasos, sampler y aceleraciones -- **[Flujos de trabajo nativos](/es/tutorials/video/minimax/minimax-h3-native)**: T2V, I2V, R2V y técnicas con nodos nativos -- **[Referencia multifotograma](/es/tutorials/video/minimax/minimax-h3-multiframe)**: fija fotogramas de referencia en la línea de tiempo -- **[Fun ControlNet Union](/es/tutorials/video/minimax/minimax-h3-fun-controlnet)**: controla el video o haz relleno inteligente con una máscara -- **[Guía de prompts](/es/tutorials/video/minimax/minimax-h3-prompt-guide)**: guías oficiales, consejos y embeddings -- **[FastH3](/es/tutorials/video/minimax/minimax-h3-fastvideo)**: checkpoints de atención dispersa de FastVideo - - -Los pesos abiertos de H3 te permiten ejecutar el modelo de forma local. El uso comercial de las salidas generadas localmente requiere una [licencia comercial de MiniMax](https://comfy.org/minimax/license), disponible a través de Comfy, el único revendedor oficial. Las generaciones en Comfy Cloud ya incluyen derechos comerciales. Consulta [Licencias comerciales](#licencia-comercial) para ver los niveles y los precios. +Los pesos abiertos de H3 te permiten ejecutar el modelo de forma local. El uso comercial de las salidas generadas localmente requiere una [licencia comercial de MiniMax](https://comfy.org/minimax/license), disponible a través de Comfy, el único revendedor oficial. Las generaciones en Comfy Cloud ya incluyen derechos comerciales. ## Características clave @@ -45,210 +26,44 @@ Los pesos abiertos de H3 te permiten ejecutar el modelo de forma local. El uso c - **Renderizado de texto preciso**: texto legible bien escrito y elementos de marca - **Pesos abiertos**: control local total en ComfyUI -## Primeros pasos - -1. Actualizar ComfyUI: las plantillas base T2V/I2V/R2V necesitan **0.30.0+**; Multiframe Reference **0.34.0+**; Fun ControlNet Union, atención dispersa y Model Attention Backend **0.35.0+**; FastH3 **0.36.0+** -2. **Biblioteca de plantillas** > **Video** > elige un flujo de trabajo de MiniMax H3 -3. Descarga los modelos desde la ventana emergente (decenas de GB; deja tiempo y espacio en disco) - -Los pesos están en Hugging Face: [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3). - - -Usa checkpoints **pruned** cuando existan tanto compilaciones full como pruned. Las compilaciones pruned guardan adaln en una tabla de curvas compartida (`adaln_t_table`) que ComfyUI lee del archivo; las plantillas cargan `minimax_h3_*_pruned_int8_convrot.safetensors`. Los LoRA destilados sobre compilaciones **full** llevan tensores adaln que no existen en las compilaciones pruned (discrepancia de forma; esos pesos se omiten). Los LoRA Turbo no tienen tensores adaln y funcionan en cualquiera de las dos compilaciones. - - -## Elegir la precisión del checkpoint - -Elige la variante más pequeña que quepa en la VRAM. Cambia solo el archivo de `UNETLoader`; ComfyUI lee la cuantización desde el checkpoint. Los LoRA deben coincidir con la familia de la variante (los LoRA para la variante completa pierden adaln en las podadas). - -| Variante (fl2va / ref2va) | Tamaño | Notas | -| --- | --- | --- | -| [`pruned_w6a8`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_w6a8.safetensors) | 16 GB | La más pequeña; ruta INT8; ComfyUI 0.38.0+ | -| [`pruned_int8_convrot`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) | 21 GB | Predeterminada en las plantillas | -| [`pruned_fp8_scaled`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_fp8_scaled.safetensors) | 21 GB | Mismo tamaño que INT8 | -| [`pruned_bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_bf16.safetensors) | 40 GB | Poda sin cuantizar | -| [`bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_bf16.safetensors) | 66 GB | Compilación completa sin cuantizar | - -Los enlaces corresponden a `fl2va` (T2V/I2V); los archivos `ref2va` están en la misma carpeta y con los mismos tamaños. **La Atención de Comfy Kitchen no puede ejecutar checkpoints `int8_convrot`**; usa una variante `bf16` con ese backend. - -Si la VRAM va justa, baja un nivel de tamaño: el offload a CPU cuesta más que renunciar a precisión. En las RTX de la serie 30, las operaciones matriciales INT8 son ~2× más rápidas que FP16 y no hay ruta FP8, así que INT8 suele superar a FP8 con el mismo tamaño de archivo. - -H3 también necesita VAE de video y de audio: [video fp16 / int8_convrot](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/main/vae) y [audio fp32](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_audio_vae_fp32.safetensors). Las plantillas usan video int8 + audio fp32; el video int8 decodifica ~2× más rápido en ComfyUI 0.36.0+. Cambia los archivos en `VAELoader` igual que el modelo de difusión. - ## Índice de flujos de trabajo -Hoy se incluyen seis flujos de trabajo de plantilla (son ejemplos, no una lista exhaustiva). La biblioteca también incluye una variante de continuación I2V (`video_minimax_h3_i2v_continuation`). +Elige un flujo en **Biblioteca de plantillas** > **Video** y descarga los modelos desde la ventana emergente. Pesos: [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3). + +Hoy se incluyen cinco flujos de trabajo de plantilla (son ejemplos, no una lista exhaustiva): `t2v`, `i2v`, `r2v`, `multiframe_reference` y `fun_controlnet_union`. - Genera videos a partir de prompts de texto con audio estéreo nativo + Genera videos a partir de prompts de texto con audio estéreo nativo. ComfyUI **0.30.0+**. - Genera videos a partir de una imagen de entrada, con control opcional de primer y último fotograma + Genera videos a partir de una imagen de entrada, con control opcional de primer y último fotograma. ComfyUI **0.30.0+**. - Fija un personaje, un estilo, un movimiento, un movimiento de cámara o una voz a partir de imágenes, videos y audio de referencia + Fija un personaje, un estilo, un movimiento, un movimiento de cámara o una voz a partir de imágenes, videos y audio de referencia. ComfyUI **0.30.0+**. - Ancla fotogramas de referencia en puntos concretos de la línea de tiempo de salida con nodos Add Guide encadenados + Ancla fotogramas de referencia en puntos concretos de la línea de tiempo de salida con nodos Add Guide encadenados. ComfyUI **0.34.0+**. - Controla H3 con un video de control Canny, Depth, HED, MLSD o Pose, o realiza relleno inteligente de video con una máscara + Controla H3 con un video de control Canny, Depth, HED, MLSD o Pose, o realiza relleno inteligente de video con una máscara. ComfyUI **0.35.0+** (Union 2.0: **0.38.0+**). La atención dispersa y Model Attention Backend también requieren **0.35.0+**. + + + Guías oficiales de prompts, consejos y embeddings para H3 + + + Checkpoints de atención dispersa FastVideo y flujos orientados a velocidad. ComfyUI **0.36.0+**. **MiniMax H3 Imagen a Video** cubre T2V y la I2V de primer y último fotograma (`t2va` / `fl2va`). **MiniMax H3 Referencia a Video** cubre R2V (`ref2va`). - -El acondicionamiento de referencia solo se aplica cuando llega al sampler. Las plantillas T2V/I2V muestrean dentro de un subgrafo conectado únicamente a **Image to Video**. Un nodo **Reference to Video** en el lienzo se ignora sin generar ningún error. Usa la plantilla R2V (o un flujo de trabajo creado a partir de ella) para obtener resultados guiados por referencias. - - -Recursos de prompts: [guía de prompts](/es/tutorials/video/minimax/minimax-h3-prompt-guide). - -## Establecer la resolución de salida {#setting-the-output-resolution} - -**Resolution Selector** establece `width` y `height` en el nodo H3: - -- **Aspect ratio**: Ajustes preestablecidos como `16:9 (Widescreen)`, `9:16 (Portrait Widescreen)`, `1:1 (Square)` -- **Megapixels**: Recuento total de píxeles (mayor = más grande, más lento) -- **Multiple**: Redondea a esta cuadrícula; mantén **32** para H3 - -Las plantillas comienzan con **Megapixels** **0.4**: **864×480** en 16:9, **640×640** en 1:1 (el valor predeterminado de I2V). Un render de 0.4 MP es rápido y suficiente para borradores; aumenta **Megapixels** antes de un render final. - -Para calidad nativa en 16:9, establece **Megapixels** en **0.98** o introduce **1344 × 768** en el nodo. H3 está entrenado cerca de 1 MP, con un borde corto de 768 píxeles y hasta un área de 768×1344. Los tamaños por encima de 768×1344 se renderizan más despacio sin añadir detalle, y la calidad baja cuanto más te alejas de la resolución de entrenamiento. Para 2K, genera en tamaño nativo y haz upscale por separado. - -Los nodos de H3 no tienen un límite de 768×1344 en el tamaño de salida: `width` y `height` avanzan de **32** en **32** hasta 16384 por eje. Los videos de referencia en **Reference to Video** se reducen para caber en un borde corto de 768 px y un área de 768×1344. Las imágenes de referencia siguen `ref_image_size`: **match** las escala al área de píxeles de la generación y **max** a un borde corto de 2048 px. - -### Ampliar a mayor resolución - -Usa un **latent upscaler** sobre el latent de video de 24 canales para evitar el efecto fantasma del recorrido de ida y vuelta por VAE. [Minimax_h3_latent_Upscaler](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler) (no oficial) necesita [minimax_h3_latent_upscaler_3d_conv_v1_bf16.safetensors](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler/blob/main/minimax_h3_latent_upscaler_3d_conv_v1/minimax_h3_latent_upscaler_3d_conv_v1_bf16.safetensors) en `ComfyUI/models/latent_upscale_models/` y su [nodo personalizado](https://github.com/LBH-123-AI/Comfyui_Minimax_h3_latent_Upscaler). Encadena **Minimax H3 Latent Upscaler (3D)** después de una pasada de baja resolución (`scale` 1.0–4.0, predeterminado 2.0) y luego vuelve a muestrear a la resolución objetivo. - -El upscale en latent ahorra tiempo, no pico de VRAM (el refinamiento se sigue ejecutando en el tamaño objetivo). Trata el refinamiento como un denoise parcial: `denoise` **0.1–0.5** conserva la composición; sube más solo para rehacer la primera pasada. Dale al sampler de refinamiento suficientes pasos para reconstruir el historial de varios pasos (consulta Sampler y scheduler). - -Los latents de video y audio son independientes (24 + 32 canales). El upscaler solo agranda espacialmente el video; el audio no cambia hasta que el refinamiento aplica denoise a ambos. Un `denoise` de refinamiento bajo conserva el audio de la primera pasada. Para conservar el audio exactamente, decodifica la primera pasada con `VAEDecodeAudio` antes del refinamiento y conecta esa pista al `CreateVideo` final (agrega `SaveAudioAdvanced` para una exportación sin pérdida). - -## Duración del clip - -H3 está entrenado con clips cortos; los nodos nativos aceptan un rango más amplio sin bloquear las solicitudes que exceden la duración. - -Las plantillas exponen `duration` en segundos, convertidos a fotogramas en la cuadrícula `17k+5` a 24 fps. - -| Ajuste | Alcance | -| --- | --- | -| Entrada `length` | 5–3600 fotogramas (~0.2 s–150 s) | -| Rango entrenado | ~124–362 fotogramas (~5–15 s) | -| Cuadrícula de fotogramas | `17k+5` a 24 fps (124 fotogramas ≈ 5.2 s) | -| Valor predeterminado de la plantilla | 5 s → 124 fotogramas | - -`duration` y `length` se redondean **hacia arriba** al siguiente valor `17k+5`: una solicitud de 5 s genera 124 fotogramas (5.17 s), y un `length` de 120 también genera 124. Los fotogramas se empaquetan desde el fotograma 0 en bloques de 17, así que los 5 fotogramas sobrantes son el último bloque, no el primero. Las solicitudes que caen entre los mismos dos puntos de la cuadrícula generan el mismo clip. - -Los clips largos a resolución completa agotan la VRAM primero; reduce los megapíxeles para ajustarlos. - -### Encadenar clips - -Más allá del rango entrenado, encadena continuaciones I2V desde el último fotograma de cada clip. Los errores se acumulan (los rostros pierden textura primero); los schedules turbo/destilados muestran el burn antes. - -Usa `video_minimax_h3_i2v_continuation` (prompt vacío): carga el último fotograma anterior y describe el siguiente segmento. Prefiere tomas cortas y continuas, y corta antes de que aparezca el burn. Para cadenas más largas, usa [H3-Anti-Burn-LoRA](https://huggingface.co/Imagineer13/H3-Anti-Burn-LoRA/blob/main/h3_antiburn_universal_v1.safetensors) en los clips posteriores al primero con `strength_model` ~0.5 (ajusta según tu estilo de continuación). - -## Cantidad de pasos - -Valores predeterminados (Lightning LoRA **desactivado**): **20 pasos**. Con turbo activado: **8** para T2V/I2V (y continuación), **4** para R2V, Multiframe y Fun ControlNet. En los subgrafos T2V/I2V, `turbo_mode`, `turbo_steps` y `turbo_model_strength` controlan el LoRA destilado. La lista también incluye un archivo fl2va de 4 pasos: [`minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/loras/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors) con `turbo_steps` **4**. - -Las tomas de referencia necesitan más pasos: los tokens de referencia viajan en cada paso, así que el turbo de 4 pasos apenas puede aplicar las referencias (deriva de pose y rostro). Para un ajuste preciso de la referencia, mantén el turbo desactivado o aumenta hacia **25**. - -Los schedules destilados suavizan el detalle fino (piel, tela, cabello) frente a la base de 20 pasos. Cada archivo turbo es específico de un modo; prueba con una semilla fija antes de apilar LoRAs de estilo. `turbo_steps` y `turbo_model_strength` son ajustables: más pasos + menor fuerza (menos de 1) te acercan de nuevo a la calidad base y consumen tiempo. Ejemplo: archivo de 4 pasos a 6–8 pasos, fuerza ~0.8. - -Los LoRA turbo acortan el schedule, no el tiempo por paso (se fusionan al cargar). Ejecutar un LoRA de 4 pasos a 20 pasos tarda aproximadamente lo mismo que la base de 20 pasos. - -Orientación según el contenido: - -- Tomas simples: **12–16** pasos suelen ser suficientes -- Detalle de alta frecuencia (cota de malla, filigrana, muchos objetos pequeños): mejora hasta ~**50**; por debajo de eso, aparecen artefactos de cuadrícula triangular en movimiento (peor con turbo) -- La mayor parte de la mejora en movimiento/prompt se logra al paso **16**; hay poco cambio visible después de **50** -- Los fotogramas suaves en resolución nativa suelen ser un problema de resolución, no de pasos - -El audio converge más tarde que el video en el denoise conjunto. El habla y el timbre necesitan **12+** pasos; con **8** pasos el audio suele ser el eslabón débil. - -## Sampler y scheduler - -Las plantillas usan **`res_multistep`** + **`simple`**. T2V/I2V/FastH3 los ocultan dentro del subgrafo; R2V, Multiframe y Fun ControlNet exponen `KSamplerSelect` y `BasicScheduler` en el lienzo. - -`res_multistep` es multistep de segundo orden (el primer paso es Euler). Dividir la programación entre dos samplers descarta el historial multistep: el primer paso del segundo sampler vuelve a ser de primer orden. Mantén una sola ejecución del sampler, o dale al segundo suficientes pasos para calentar. - -Los desplazamientos H3 predeterminados son `shift` **12** y `audio_shift` **3** según la definición del modelo (sin nodo adicional). Las plantillas FastH3 configuran **MiniMax H3 Sigma Shift** con `shift_video` **10**, `shift_audio` **3**. Un valor de shift de video incorrecto en versiones destiladas (p. ej., **3** en lugar de **10** en 8 pasos) puede mostrar artefactos de cuadrícula. Los finetunes personalizados pueden necesitar su propio par en **MiniMax H3 Sigma Shift** (consulta la tarjeta de modelo del archivo). [LoRA DMAD de 4 pasos](https://huggingface.co/ZhengmingYu/DMAD/blob/main/minimax_h3/dmad_minimax_h3_4step_full_critic_comfyui.safetensors) usa `shift` **12**, `audio_shift` **2**, **`lcm`** + **`simple`**. - -## Acelerar la generación con Sage Attention - -[Sage Attention](https://github.com/woct0rdho/SageAttention) puede acelerar aproximadamente **2×** con un pequeño impacto en la calidad (instalación opcional): - -1. Ejecuta `pip install` con el wheel que coincida con tu PyTorch/CUDA desde [releases](https://github.com/woct0rdho/SageAttention/releases) -2. Instala [KJNodes](https://github.com/kijai/ComfyUI-KJNodes) para `Patch Sage Attention KJ` -3. Insértalo entre `UNETLoader` y `BasicGuider`; establece `sage_attention` en `auto` -4. O inicia con `--use-sage-attention` - -Sage necesita float16/bfloat16; algunas capas de H3 usan otros dtypes y recurren a la atención de PyTorch (las advertencias en la consola son normales). - -### Degradación de la calidad con atención INT8 - -La deformación al final del clip o el texto distorsionado en pantalla con Sage suelen venir de la cuantización de la atención INT8 (canales calientes en los bloques finales). - -- Las plantillas usan checkpoints **`int8_convrot`**. **Comfy Kitchen no les da soporte** ([problema #15529](https://github.com/Comfy-Org/ComfyUI/issues/15529)). Usa la atención predeterminada o cambia `UNETLoader` a **`pruned_bf16`** y luego cambia el backend. -- En checkpoints **bf16**, la **atención de Comfy Kitchen** (rotación de canales antes de cuantizar) elimina los artefactos a una velocidad similar. - -Añade **Backend de atención del modelo** (`comfy kitchen attention`) en la ruta del modelo hacia `BasicGuider` (después de LoRA/turbo), o usa `--use-ck-attention` (0.32.0+). Requiere los kernels INT8 de `comfy-kitchen` en tu hardware. - -## Acelerar la generación con atención dispersa - -**Atención dispersa por bloques del modelo** (0.35.0+, experimental) reduce el costo de atención en clips largos. Para H3 base, usa `method` **`sol-attn`** (`sla`/`vsa` necesitan pesos correspondientes). Requiere CUDA + `sol_attn` de `comfy-kitchen`; de lo contrario, las capas permanecen densas. - -- Valores predeterminados: `start_percent` **0.2**, `end_percent` **1.0**. Un inicio más tardío (~**0.4**) y un final más temprano (~**0.9**) protegen los fotogramas de apertura y cierre. -- Mantén **`sink_conditioning`** en **`exact_kv_and_rows`** en H3 (protege las filas empaquetadas de texto, audio y referencia). -- **`tau`**: un valor más alto = más disperso y rápido (`1.0` ~16% de bloques exactos, `1.3` predeterminado, `2.0` ~2.7%). -- Las secuencias cortas por debajo de `min_tokens` (predeterminado **12288**) obtienen poca mejora. - -FastH3 usa **`vsa`** con `keep_percent` **10**; consulta la [página de FastH3](/es/tutorials/video/minimax/minimax-h3-fastvideo). - -### Comprobar si la atención dispersa está activa - -Las plantillas base de H3 no incluyen el nodo. Agrega **Model Sparse Attention** entre `UNETLoader` y `BasicGuider`, y luego activa **`verbose`** (en Avanzado, desactivado de forma predeterminada) para registrar una línea por cada forma de atención. - -Las llamadas que siguen en modo denso registran `dense ( tokens): ` o `dense (, , , ): `. Solo se informa la primera condición que falla: - -| Motivo registrado | Qué cambiar | -| --- | --- | -| `no compiled sol_attn kernel for this GPU` | El `comfy-kitchen` instalado no tiene kernel para tu GPU. Actualízalo o deja el nodo fuera en esa máquina. | -| ` tokens < min_tokens ` | Aumenta la resolución o la duración del clip, o baja `min_tokens` (predeterminado **12288**). | -| `sigma outside the start/end window` | Amplía `start_percent` y `end_percent`. | -| `block in dense_blocks` | Quita ese índice de bloque de `dense_blocks`. | -| `no H3 layout for this call` | Solo `vsa`. Selecciona `sol-attn`. | - -Las llamadas que tienen éxito registran `sparse (, , , ), sinks /` o `sparse producer path: tokens, `. - -Hay tres condiciones que nunca registran nada, incluso con `verbose` activado: las activaciones que no son bfloat16 en la ruta de H3, un `head_dim` distinto de **128** y las frecuencias de rope ausentes se degradan en silencio. - -`vsa` está ligado al checkpoint de FastH3. Lee una rama gruesa aprendida de las capas `to_gate_compress` que solo traen esos pesos, así que en cualquier otro checkpoint de H3 el nodo imprime `VSA: the model has no to_gate_compress layers; running the fine stage without the coarse branch` y ejecuta solo la etapa fina. Esa advertencia no depende de `verbose`. - ## Licencia comercial -Los pesos abiertos de H3 puedes descargarlos y ejecutarlos gratis. Para usar comercialmente las salidas generadas en local necesitas una [licencia comercial de MiniMax](https://comfy.org/minimax/license), que se vende a través de Comfy, el único revendedor oficial. Las generaciones en Comfy Cloud ya incluyen derechos comerciales, así que la licencia solo es necesaria para uso local. - -¿Necesitas una? - -- **Comfy Cloud**: el uso comercial está incluido. No hay nada que comprar. -- **Tu propio hardware, fuera de EE. UU., la UE, el Reino Unido y Corea, con ingresos anuales inferiores a $20M**: la licencia comunitaria gratuita de MiniMax cubre el uso comercial. Muestra un crédito "Powered by MiniMax H3"; la misma regla de territorio se aplica al lugar donde se usan tus salidas. -- **Tu propio hardware en EE. UU., la UE, el Reino Unido o Corea, o con ingresos anuales superiores a $20M**: necesitas una de las dos licencias que aparecen abajo. - -Las licencias vienen en dos niveles: +El uso comercial de salidas generadas en local requiere una licencia de Comfy. Las generaciones en Comfy Cloud ya incluyen derechos comerciales. -| | Profesional | Empresa | -| ------------------------- | ---------------------- | ------------------------------------------------------------ | -| Precio | Desde $5,000 al mes | Personalizado, contrato anual, con precio según tu volumen | -| Vigencia | Mensual | Mínimo de 12 meses | -| Usuarios con licencia | Hasta 10 | Sin límite | -| Dominios | 1 | Personalizado | -| Versiones del modelo | Pesos abiertos destilados | Todas las versiones, pesos no destilados y nuevos lanzamientos incluidos | -| Uso comercial de las salidas | Derechos comerciales completos | Derechos comerciales completos | -| Ajuste fino y LoRA | Incluido | Incluido | -| Trabajo para clientes y aguas abajo | Incluido | Incluido | - -Profesional comienza en $5,000 al mes. Empresa no tiene un precio de lista fijo: el precio se ajusta a tu volumen de generación y a tu equipo. Ambos niveles cubren MiniMax H3 y MiniMax Audio & Music bajo un mismo acuerdo. [Solicita una licencia](https://comfy.org/contact) para obtener una cotización. + + + Cuándo necesitas licencia, niveles comunitario vs Profesional y Empresa, y cómo solicitar una cotización. + + diff --git a/ja/tutorials/video/minimax/minimax-h3-fastvideo.mdx b/ja/tutorials/video/minimax/minimax-h3-fastvideo.mdx index dd5d546dd0..fb12ea7d43 100644 --- a/ja/tutorials/video/minimax/minimax-h3-fastvideo.mdx +++ b/ja/tutorials/video/minimax/minimax-h3-fastvideo.mdx @@ -140,4 +140,4 @@ ComfyUI/ - **ComfyMathExpression**: 長さの入力を、24fps の 17k+5 グリッド上の有効なフレーム `length` に変換します - **サンプラー**: `res_multistep` サンプラー、`simple` スケジューラ、8 ステップ -FastH3 のウェイトには `to_gate_compress` ゲート層があり、VSA の粗いブランチはこれを読みます。ベース H3 のチェックポイントにはありません。比較するには **Model Sparse Attention** ノードの `method` を `sol-attn` にし、シードを固定します。`sol-attn` は対応ウェイトを必要とせず、任意の H3 チェックポイントで設定した `tau` のまま動作します。詳細はベース H3 ページの[スパースアテンション](/ja/tutorials/video/minimax/minimax-h3#スパースアテンションによる生成の高速化)を参照してください。 +FastH3 のウェイトには `to_gate_compress` ゲート層があり、VSA の粗いブランチはこれを読みます。ベース H3 のチェックポイントにはありません。比較するには **Model Sparse Attention** ノードの `method` を `sol-attn` にし、シードを固定します。`sol-attn` は対応ウェイトを必要とせず、任意の H3 チェックポイントで設定した `tau` のまま動作します。 diff --git a/ja/tutorials/video/minimax/minimax-h3-prompt-guide.mdx b/ja/tutorials/video/minimax/minimax-h3-prompt-guide.mdx index ad079feee8..d34f9acff9 100644 --- a/ja/tutorials/video/minimax/minimax-h3-prompt-guide.mdx +++ b/ja/tutorials/video/minimax/minimax-h3-prompt-guide.mdx @@ -38,7 +38,7 @@ non_diegetic_music: ... 1. **シーン優先**: 全体のあと `integrated_multimodal_description` の `[Shot 1]` 内ショット 2. **1 ブロック**: ショット、カメラ、オーディオ -3. **解像度**: 16:9 ネイティブ **1344×768**; **32** 倍数([詳細](/ja/tutorials/video/minimax/minimax-h3#出力解像度の設定)) +3. **解像度**: 16:9 ネイティブ **1344×768**; **32** 倍数 4. **長さ**: `length` は 24fps フレーム(既定 **124** ≈ 5s)、**17k+5** にスナップ 5. **画面文字**: 英語二重引用符、原文(例 `A red neon sign reading "营业中"`); 台詞は `` 6. **R2V オーディオマーカー**: `fully_copy`、`partially_copy`、`reference`、`weak_reference`(公式 ref 表参照) diff --git a/ja/tutorials/video/minimax/minimax-h3.mdx b/ja/tutorials/video/minimax/minimax-h3.mdx index 97bd3e5f18..22ee813942 100644 --- a/ja/tutorials/video/minimax/minimax-h3.mdx +++ b/ja/tutorials/video/minimax/minimax-h3.mdx @@ -1,40 +1,20 @@ --- title: "ComfyUI MiniMax H3 動画生成ガイド" -description: "ComfyUI でオープンウェイトの MiniMax H3 を使う方法: テキストから動画、画像から動画、参照から動画のワークフローとネイティブステレオオーディオ、プロンプト作成のコツ、Sage Attention による高速化。" +description: "ComfyUI でオープンウェイトの MiniMax H3 を使う方法: テキストから動画、画像から動画、参照から動画のワークフロー、ネイティブステレオオーディオ、各ガイドへの入口。" sidebarTitle: "概要" -translationSourceHash: e95e545e +translationSourceHash: d65cf3e6 translationFrom: tutorials/video/minimax/minimax-h3.mdx translationBlockHashes: - "_intro": 94f54ee8 + "_intro": f7f0c886 "Key features": 8ca92280 - "Getting started": eed90954 - "Choosing the checkpoint precision": 4a53fdf9 - "Workflow index": bdc3b9f8 - "Setting the output resolution": 1fda252d - "Clip length": 2d495d82 - "Step count": d2a8a6f8 - "Sampler and scheduler": 79c739c3 - "Speeding up generation with Sage Attention": 24cc9a70 - "Speeding up generation with sparse attention": 801c9acf - "Commercial licensing": 201e2de5 + "Choosing a template Workflow": 6dffc9b6 + "Commercial licensing": 3b2a9c1c --- -import UpdateReminder from "/snippets/ja/tutorials/update-reminder.mdx"; - [MiniMax H3](https://www.minimax.io/blog/minimax-h3) は MiniMax のオープンウェイト omni-modal モデルです。テキスト、画像、ビデオ、オーディオを単一コンテキストで理解し、**ネイティブステレオオーディオ**付きのビデオ(音声、SFX、音楽を一体)を 1 パスで生成します。オープンウェイトは約 100 万ピクセル(短辺 768px)、24fps、最長約 15 秒が目安です。2K はホスト型サービスの出力で、ComfyUI では別途アップスケールが必要です。 -ドキュメントは 6 ページに分かれています: - -- **概要**(このページ): 機能、チェックポイント、ワークフロー索引、解像度、クリップ長、ステップ、サンプラー、高速化 -- **[ネイティブワークフロー](/ja/tutorials/video/minimax/minimax-h3-native)**: T2V、I2V、R2V とネイティブノードのテクニック -- **[マルチフレーム参照](/ja/tutorials/video/minimax/minimax-h3-multiframe)**: タイムライン上の参照フレームを固定 -- **[Fun ControlNet Union](/ja/tutorials/video/minimax/minimax-h3-fun-controlnet)**: コントロールビデオまたはマスクによるインペイント -- **[プロンプトガイド](/ja/tutorials/video/minimax/minimax-h3-prompt-guide)**: 公式ガイド、ヒント、埋め込み -- **[FastH3](/ja/tutorials/video/minimax/minimax-h3-fastvideo)**: FastVideo スパースアテンションのチェックポイント - - -H3 のオープンウェイトはローカルで実行できます。ローカル生成した出力を商用利用するには、唯一の公式販売代理店である Comfy を通じて [MiniMax 商用ライセンス](https://comfy.org/minimax/license) が必要です。Comfy Cloud 上の生成にはすでに商用利用権が含まれています。ティアと料金は [商用ライセンス](#商用ライセンス) を参照してください。 +H3 のオープンウェイトはローカルで実行できます。ローカル生成した出力を商用利用するには、唯一の公式販売代理店である Comfy を通じて [MiniMax 商用ライセンス](https://comfy.org/minimax/license) が必要です。Comfy Cloud 上の生成にはすでに商用利用権が含まれています。 ## 主な機能 @@ -46,210 +26,44 @@ H3 のオープンウェイトはローカルで実行できます。ローカ - **正確なテキストレンダリング**: 綴りとブランド要素をクリアに - **オープンウェイト**: ComfyUI でローカルにフル制御 -## はじめに - -1. ComfyUI を更新: 基本 T2V/I2V/R2V テンプレートは **0.30.0+**、マルチフレーム参照 **0.34.0+**、Fun ControlNet Union・スパースアテンション・Model Attention Backend **0.35.0+**、FastH3 **0.36.0+** -2. **テンプレートライブラリ** > **ビデオ** > MiniMax H3 ワークフローを選択 -3. ポップアップからモデルをダウンロード(数十 GB、時間とディスクを確保) - -ウェイトは [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3) にあります。 - - -フルと pruned の両方がある場合は **pruned** を使います。pruned は adaln を共有カーブ表(`adaln_t_table`)に置き、ComfyUI はファイルから読み取ります。テンプレートは `minimax_h3_*_pruned_int8_convrot.safetensors` を読み込みます。**フル**ビルドで蒸留した LoRA の adaln テンソルは pruned に無く(形状不一致でスキップ)。Turbo LoRA に adaln はなく、どちらのビルドでも可。 - - -## チェックポイント精度の選択 - -VRAM に収まる最小ビルドを選びます。`UNETLoader` のファイルだけ変更すればよく、量子化は checkpoint から読み取られます。LoRA はビルド系列に合わせます(フルビルド LoRA は pruned で adaln を失います)。 - -| ビルド(fl2va / ref2va) | サイズ | 補足 | -| --- | --- | --- | -| [`pruned_w6a8`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_w6a8.safetensors) | 16 GB | 最小; INT8 経路; ComfyUI 0.38.0+ | -| [`pruned_int8_convrot`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) | 21 GB | テンプレート既定 | -| [`pruned_fp8_scaled`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_fp8_scaled.safetensors) | 21 GB | INT8 と同サイズ | -| [`pruned_bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_bf16.safetensors) | 40 GB | 非量子化 pruned | -| [`bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_bf16.safetensors) | 66 GB | フル非量子化 | - -リンクは T2V/I2V の `fl2va` です。`ref2va` は同フォルダ・同サイズ。**Comfy Kitchen attention は `int8_convrot` checkpoint を実行できません**。そのバックエンドでは `bf16` を選んでください。 - -VRAM が足りない場合は 1 段下げます。CPU offload は精度より遅いです。RTX 30 系では INT8 行列が FP16 の約 2×で FP8 経路がないため、同サイズでは INT8 が FP8 より速いことが多いです。 - -動画・音声 VAE も必要です: [動画 fp16 / int8_convrot](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/main/vae) と [音声 fp32](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_audio_vae_fp32.safetensors)。テンプレートは int8 動画 + fp32 音声; int8 動画は ComfyUI 0.36.0+ でデコード約 2×。拡散モデルと同様に `VAELoader` で差し替えます。 - ## ワークフロー索引 -テンプレートは現在 6 例(網羅的ではありません)。I2V 続きの変体(`video_minimax_h3_i2v_continuation`)もあります。 +**テンプレートライブラリ** > **ビデオ** から MiniMax H3 ワークフローを選び、ポップアップでモデルをダウンロードします。ウェイト: [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3)。 + +テンプレートは現在 5 例(網羅的ではありません):`t2v`、`i2v`、`r2v`、`multiframe_reference`、`fun_controlnet_union`。 - テキストプロンプトから、ネイティブのステレオオーディオ付きビデオを生成します。 + テキストプロンプトから、ネイティブのステレオオーディオ付きビデオを生成します。ComfyUI **0.30.0+**。 - 入力画像からビデオを生成します。先頭・末尾フレームの制御もオプションで指定できます。 + 入力画像からビデオを生成します。先頭・末尾フレームの制御もオプションで指定できます。ComfyUI **0.30.0+**。 - 参照画像、ビデオ、オーディオから、キャラクター、スタイル、モーション、カメラワーク、または音声を固定します。 + 参照画像、ビデオ、オーディオから、キャラクター、スタイル、モーション、カメラワーク、または音声を固定します。ComfyUI **0.30.0+**。 - Add Guideノードを連結して、出力タイムライン上の特定のポイントに参照フレームを固定します。 + Add Guideノードを連結して、出力タイムライン上の特定のポイントに参照フレームを固定します。ComfyUI **0.34.0+**。 - Canny、Depth、HED、MLSD、またはPoseのコントロールビデオでH3を駆動するか、マスクを使用してビデオインペインティングを実行できます。 + Canny、Depth、HED、MLSD、またはPoseのコントロールビデオでH3を駆動するか、マスクを使用してビデオインペインティングを実行できます。ComfyUI **0.35.0+**(Union 2.0: **0.38.0+**)。スパースアテンションと Model Attention Backend も **0.35.0+** が必要です。 + + + H3 向けの公式プロンプトガイド、ヒント、埋め込み + + + FastVideo スパースアテンション checkpoint と高速化ワークフロー。ComfyUI **0.36.0+**。 **MiniMax H3 Image to Video** が T2V と先頭/末尾フレーム I2V(`t2va` / `fl2va`)を、**MiniMax H3 Reference to Video** が R2V(`ref2va`)を担当します。 - -参照条件はサンプラーに届いたときだけ効きます。T2V/I2V テンプレートはサブグラフ内で **Image to Video** のみにサンプルします。キャンバスの **Reference to Video** はエラーなく無視されます。参照駆動には R2V テンプレート(またはそれを基にしたワークフロー)を使ってください。 - - -プロンプト: [プロンプトガイド](/ja/tutorials/video/minimax/minimax-h3-prompt-guide)。 - -## 出力解像度の設定 - -**Resolution Selector** が H3 ノードの `width` / `height` を設定します: - -- **Aspect ratio**: `16:9 (Widescreen)`、`9:16 (Portrait Widescreen)`、`1:1 (Square)` など -- **Megapixels**: 総ピクセル(大きいほど遅い) -- **Multiple**: グリッド丸め; H3 は **32** のまま - -テンプレートの **Megapixels** は既定で **0.4** です。16:9 では **864×480**、1:1 では **640×640**(I2V の既定)。0.4 MP は高速で下書き向けなので、最終出力の前に **Megapixels** を上げてください。 - -16:9 ネイティブ品質: **Megapixels** を **0.98** にするか、ノードに **1344 × 768** を入力します。H3 の学習解像度は約 1 MP で、短辺 768px、面積は最大 768×1344 です。768×1344 を超えるサイズは遅くなるだけで詳細は増えません。学習解像度から離れるほど画質も落ちます。2K はネイティブ生成後に別途アップスケールしてください。 - -H3 ノードは出力サイズに 768×1344 の上限を設けません。`width` と `height` は **32** 刻みで、各辺あたり最大 16384 です。**Reference to Video** の参照動画は、短辺 768px、面積 768×1344 に収まるよう縮小されます。参照画像は `ref_image_size` に従います。**match** は今回の生成のピクセル面積、**max** は短辺 2048px に縮小します。 - -### 高解像度へのアップスケール - -24 チャンネル動画 latent の **latent アップスケーラー**で VAE 往復のゴーストを避けます。[Minimax_h3_latent_Upscaler](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler)(非公式)は [重み](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler/blob/main/minimax_h3_latent_upscaler_3d_conv_v1/minimax_h3_latent_upscaler_3d_conv_v1_bf16.safetensors) と [カスタムノード](https://github.com/LBH-123-AI/Comfyui_Minimax_h3_latent_Upscaler) が必要です。低解像度生成後 **Minimax H3 Latent Upscaler (3D)**(`scale` 1.0–4.0、既定 2.0)を挟み、目標解像度で再サンプル。 - -Latent アップスケールは時間を節約し、ピーク VRAM は節約しません。仕上げは部分デノイズ: `denoise` **0.1–0.5** で構図維持; 大きく作り直すときだけ上げます。仕上げサンプラーは多段履歴の再構築に十分なステップを(「サンプラーとスケジューラ」参照)。 - -動画 latent(24)と音声 latent(32)は別です。アップスケーラーは動画空間のみ拡大; 仕上げで両方デノイズ。低 `denoise` で初回音声を保持。完全一致なら仕上げ前に `VAEDecodeAudio` で初回音声をデコードし最終 `CreateVideo` に接続(`SaveAudioAdvanced` でロスレス出力可)。 - -## クリップの長さ - -H3 は短クリップで学習; ネイティブノードは広い範囲を受け付け、過長もブロックしません。 - -テンプレートは秒の `duration` を 24fps で **17k+5** フレームに変換します。 - -| 設定 | 範囲 | -| --- | --- | -| `length` 入力 | 5–3600 フレーム(約 0.2 s–150 s) | -| 学習範囲 | 約 124–362 フレーム(約 5–15 s) | -| フレームグリッド | 24fps で `17k+5`(124 フレーム ≈ 5.2 s) | -| テンプレート既定 | 5 s → 124 フレーム | - -`duration` と `length` はどちらも `17k+5` グリッドへ切り上げられます。5 s を指定すると 124 フレーム(5.17 s)、`length` に 120 を入れても 124 フレームになります。フレームは 0 フレーム目から 17 フレームずつ並び、余りの 5 フレームが最後のブロックです。同じ 2 つのグリッド値の間にある指定は同じクリップになります。 - -満解像度の長クリップは先に VRAM を使い切ります。Megapixels を下げて収めます。 - -### クリップの連結 - -学習範囲超えは I2V 続きで各クリップの最終フレームから。誤差は累積(顔テクスチャが先に劣化); turbo/蒸留は早く「焼け」ます。 - -`video_minimax_h3_i2v_continuation`(空プロンプト): 最終フレームを読み込み次区間を記述。連続ショットは短く、焼け前にカット。長い連鎖では初回以降 [H3-Anti-Burn-LoRA](https://huggingface.co/Imagineer13/H3-Anti-Burn-LoRA/blob/main/h3_antiburn_universal_v1.safetensors) を `strength_model` 約 0.5(続き方に合わせて調整)。 - -## ステップ数 - -既定(Lightning LoRA **オフ**): **20** ステップ。turbo オン: T2V/I2V(続き含む)**8**、R2V・マルチフレーム・Fun ControlNet **4**。T2V/I2V サブグラフは `turbo_mode`、`turbo_steps`、`turbo_model_strength`。4 ステップ fl2va: [`minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/loras/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors)、`turbo_steps` **4**。 - -参照ショットはステップ多め: 参照トークンは毎ステップ; 4 ステップ turbo は参照がほぼ乗らず(ポーズ/顔ドリフト)。厳密な参照一致では turbo オフまたは **25** 付近。 - -蒸留スケジュールは 20 ステップ基線より細部が滑らか。各 turbo ファイルはモード別; スタイル LoRA を重ねる前に固定シードで試験。`turbo_steps` 増 + `turbo_model_strength` 低下(<1)で基線品質に近づき時間増。例: 4 ステップファイルを 6–8 ステップ、強度約 0.8。 - -Turbo は schedule を短くするだけで 1 ステップは速くなりません(読み込み時マージ)。4 ステップ LoRA を 20 ステップ回すと基線 20 と同程度の時間。 - -内容別: - -- 単純ショット: **12–16** ステップで足りることが多い -- 高周波詳細(チェインメイル、フィリグリー、小物体多数): 約 **50** まで改善; それ未満は動き中の三角グリッドアーティファクト(turbo で悪化) -- モーション/プロンプトの大半は **16** ステップまで; **50** 以降は差が小さい -- ネイティブ解像度のソフトさは多くが解像度問題 - -音声は共同デノイズで映像より収束が遅い。音声・音色は **12+** ステップ; **8** では音声が弱いことが多い。 - -## サンプラーとスケジューラ - -テンプレートは **`res_multistep`** + **`simple`**。T2V/I2V/FastH3 はサブグラフ内; R2V、マルチフレーム、Fun ControlNet はキャンバスに `KSamplerSelect` と `BasicScheduler`。 - -`res_multistep` は 2 次多段(初ステップは Euler)。2 サンプラーに分割すると多段履歴が失われ、2 番目の初ステップは再び 1 次。1 回のサンプル実行にまとめるか、2 番目に十分なステップでウォームアップ。 - -既定 shift: **12**、`audio_shift`: **3**(モデル定義)。FastH3 テンプレート **ModelSamplingMiniMaxH3** は `shift_video` **10**、`shift_audio` **3**。蒸留ビルドで video shift 誤り(8 ステップで **10** ではなく **3**)はグリッドアーティファクト。[DMAD 4-step LoRA](https://huggingface.co/ZhengmingYu/DMAD/blob/main/minimax_h3/dmad_minimax_h3_4step_full_critic_comfyui.safetensors) は shift **12**、`audio_shift` **2**、**`lcm`** + **`simple`**。 - -## Sage Attention で生成を高速化 - -[Sage Attention](https://github.com/woct0rdho/SageAttention) で約 **2×** 加速、画質影響は小さいことが多い(任意インストール): - -1. [releases](https://github.com/woct0rdho/SageAttention/releases) から PyTorch/CUDA 一致 wheel を `pip install` -2. [KJNodes](https://github.com/kijai/ComfyUI-KJNodes) の `Patch Sage Attention KJ` -3. `UNETLoader` と `BasicGuider` の間、`sage_attention` を `auto` -4. または `--use-sage-attention` - -一部 H3 層は float16/bfloat16 外で PyTorch attention にフォールバック(コンソール警告は正常)。 - -### INT8 アテンションによる品質劣化 - -クリップ終盤のモーフや画面文字化けは INT8 attention 量子化が原因のことが多い。 - -- テンプレートは **`int8_convrot`**。**Comfy Kitchen は非対応**([issue #15529](https://github.com/Comfy-Org/ComfyUI/issues/15529))。既定 attention か **`pruned_bf16`** に替えてからバックエンド変更。 -- **bf16** では **Comfy Kitchen attention**(量子化前チャンネル回転)が同程度速度でアーティファクト解消。 - -`BasicGuider` へのモデル経路に **Model Attention Backend**(`comfy kitchen attention`)、または `--use-ck-attention`(0.32.0+)。ハードウェアで `comfy-kitchen` INT8 カーネルが必要。 - -## スパースアテンションによる生成の高速化 - -**Model Sparse Attention**(0.35.0+、実験的)が長クリップの attention コストを削減。ベース H3 は **`sol-attn`**(`sla`/`vsa` は対応ウェイト必要)。CUDA + `comfy-kitchen` の `sol_attn`、なければ dense のまま。 - -- 既定 `start_percent` **0.2**、`end_percent` **1.0**。約 **0.4** 開始・**0.9** 終了で首尾フレーム保護。 -- H3 は **`sink_conditioning`** を **`exact_kv_and_rows`** のまま。 -- **`tau`**: 大きいほど疎/速(`1.0` 約 16% 正確ブロック、`1.3` 既定、`2.0` 約 2.7%)。 -- `min_tokens`(既定 **12288**)未満は効果小。 - -FastH3 は **`vsa`**、`keep_percent` **10**; [FastH3 ページ](/ja/tutorials/video/minimax/minimax-h3-fastvideo)。 - -### スパースアテンションが効いているか確認する - -ベース H3 のテンプレートにこのノードは入っていません。`UNETLoader` と `BasicGuider` の間に **Model Sparse Attention** を追加し、**`verbose`**(詳細設定、既定はオフ)をオンにすると、attention 形状ごとに 1 行ログが出ます。 - -dense のままになる呼び出しは `dense ( tokens): ` または `dense (, , , ): ` を出力し、最初に満たさなかった条件だけを報告します。 - -| ログの理由 | 対処 | -| --- | --- | -| `no compiled sol_attn kernel for this GPU` | インストール済みの `comfy-kitchen` にこの GPU 用 kernel がありません。更新するか、そのマシンではこのノードを使いません。 | -| ` tokens < min_tokens ` | 解像度かクリップ長を上げる、または `min_tokens` を下げます(既定は **12288**)。 | -| `sigma outside the start/end window` | `start_percent` と `end_percent` を広げます。 | -| `block in dense_blocks` | そのブロック番号を `dense_blocks` から外します。 | -| `no H3 layout for this call` | `vsa` のみ。`sol-attn` に切り替えます。 | - -成功した呼び出しは `sparse (, , , ), sinks /` または `sparse producer path: tokens, ` を出力します。 - -`verbose` をオンにしてもログが出ない条件が 3 つあります。H3 経路の活性化が bfloat16 でない、`head_dim` が **128** でない、rope 周波数が無い場合で、いずれも黙って dense に戻ります。 - -`vsa` は FastH3 チェックポイントに紐づきます。そのウェイトだけが持つ `to_gate_compress` 層が供給する粗いブランチを読むため、他の H3 チェックポイントではノードが `VSA: the model has no to_gate_compress layers; running the fine stage without the coarse branch` を出力し、細かい段階だけを実行します。この警告は `verbose` では制御されません。 - ## 商用ライセンス -H3 のオープンウェイトは無料でダウンロードして実行できます。ローカル生成した出力を商用利用するには、唯一の公式販売代理店である Comfy を通じて販売される [MiniMax 商用ライセンス](https://comfy.org/minimax/license) が必要です。Comfy Cloud 上の生成にはすでに商用利用権が含まれているため、ライセンスが必要になるのはローカル利用の場合のみです。 - -ライセンスは必要ですか? - -- **Comfy Cloud**:商用利用が含まれています。購入は不要です。 -- **米国、EU、英国、韓国以外で自社ハードウェア上で実行し、年間売上が 2,000 万米ドル未満**:MiniMax の無料コミュニティライセンスで商用利用がカバーされます。"Powered by MiniMax H3" のクレジットを表示してください。同じ地域ルールは出力の利用地にも適用されます。 -- **米国、EU、英国、韓国で自社ハードウェア上で実行する、または年間売上が 2,000 万米ドル超**:以下の 2 つのライセンスのいずれかが必要です。 - -ライセンスは 2 つのティアがあります: +ローカル生成した出力の商用利用には Comfy 経由のライセンスが必要です。Comfy Cloud の生成にはすでに商用利用権が含まれます。 -| | Professional | Enterprise | -| ------------------------- | ---------------------- | ------------------------------------------------------------ | -| 価格 | 月額 $5,000 から | カスタム。年間契約、利用量に応じた価格 | -| 契約期間 | 月次 | 最短 12 か月 | -| ライセンスユーザー | 最大 10 人 | 上限なし | -| ドメイン | 1 | カスタム | -| モデルバージョン | Distilled オープンウェイト | 全バージョン(非 Distilled ウェイトと新リリースを含む) | -| 出力の商用利用 | 完全な商用利用権 | 完全な商用利用権 | -| ファインチューニングと LoRA | 含む | 含む | -| クライアントおよび下流の作業 | 含む | 含む | - -Professional は月額 $5,000 からです。Enterprise には定価がなく、生成量とチーム規模に応じて見積もります。いずれのティアも、1 つの契約で MiniMax H3 と MiniMax Audio & Music をカバーします。[ライセンスをリクエスト](https://comfy.org/contact) して見積もりを取得してください。 + + + ライセンスが必要な場合、コミュニティと Professional/Enterprise のティア、見積もりの依頼方法。 + + diff --git a/ko/tutorials/video/minimax/minimax-h3-fastvideo.mdx b/ko/tutorials/video/minimax/minimax-h3-fastvideo.mdx index 2a740416eb..21741f66bc 100644 --- a/ko/tutorials/video/minimax/minimax-h3-fastvideo.mdx +++ b/ko/tutorials/video/minimax/minimax-h3-fastvideo.mdx @@ -140,4 +140,4 @@ ComfyUI/ - **ComfyMathExpression**: 길이 입력을 24fps의 17k+5 그리드에서 유효한 프레임 `length`로 변환합니다 - **샘플러**: `res_multistep` 샘플러, `simple` 스케줄러, 8스텝 -FastH3 가중치에는 `to_gate_compress` 게이트 레이어가 있고, VSA의 거친 브랜치가 이를 읽습니다. 베이스 H3 체크포인트에는 없습니다. 비교하려면 **Model Sparse Attention** 노드의 `method`를 `sol-attn`으로 두고 시드를 고정하세요. `sol-attn`은 대응 가중치가 필요 없고 어떤 H3 체크포인트에서든 설정한 `tau` 값으로 동작합니다. 자세한 내용은 베이스 H3 페이지의 [스파스 어텐션](/ko/tutorials/video/minimax/minimax-h3#스파스-어텐션으로-생성-가속)을 참고하세요. +FastH3 가중치에는 `to_gate_compress` 게이트 레이어가 있고, VSA의 거친 브랜치가 이를 읽습니다. 베이스 H3 체크포인트에는 없습니다. 비교하려면 **Model Sparse Attention** 노드의 `method`를 `sol-attn`으로 두고 시드를 고정하세요. `sol-attn`은 대응 가중치가 필요 없고 어떤 H3 체크포인트에서든 설정한 `tau` 값으로 동작합니다. diff --git a/ko/tutorials/video/minimax/minimax-h3-prompt-guide.mdx b/ko/tutorials/video/minimax/minimax-h3-prompt-guide.mdx index 4970df9ad9..e45e85a9bc 100644 --- a/ko/tutorials/video/minimax/minimax-h3-prompt-guide.mdx +++ b/ko/tutorials/video/minimax/minimax-h3-prompt-guide.mdx @@ -38,7 +38,7 @@ non_diegetic_music: ... 1. **장면 우선**: 전체 후 `integrated_multimodal_description` `[Shot 1]` 샷 2. **한 블록**: 샷, 카메라, 오디오 -3. **해상도**: 16:9 네이티브 **1344×768**; **32** 배수([상세](/ko/tutorials/video/minimax/minimax-h3#출력-해상도-설정)) +3. **해상도**: 16:9 네이티브 **1344×768**; **32** 배수 4. **길이**: `length` 24fps 프레임(기본 **124** ≈ 5s), **17k+5** 스냅 5. **화면 텍스트**: 영어 큰따옴표·원문(예 `A red neon sign reading "营业中"`); 대사 `` 6. **R2V 오디오 마커**: `fully_copy`, `partially_copy`, `reference`, `weak_reference`(공식 ref 표) diff --git a/ko/tutorials/video/minimax/minimax-h3.mdx b/ko/tutorials/video/minimax/minimax-h3.mdx index 9b862322a8..0109ea2a88 100644 --- a/ko/tutorials/video/minimax/minimax-h3.mdx +++ b/ko/tutorials/video/minimax/minimax-h3.mdx @@ -1,40 +1,20 @@ --- title: "ComfyUI MiniMax H3 비디오 생성 가이드" -description: "ComfyUI에서 오픈 가중치 MiniMax H3를 사용하는 방법: 텍스트 기반, 이미지 기반, 레퍼런스 기반 비디오 워크플로와 네이티브 스테레오 오디오, 프롬프트 작성 팁, Sage Attention 가속화." +description: "ComfyUI에서 오픈 가중치 MiniMax H3 사용법: 텍스트·이미지·레퍼런스 기반 비디오 워크플로, 네이티브 스테레오 오디오, 각 가이드로 연결되는 개요." sidebarTitle: "개요" -translationSourceHash: e95e545e +translationSourceHash: d65cf3e6 translationFrom: tutorials/video/minimax/minimax-h3.mdx translationBlockHashes: - "_intro": 94f54ee8 + "_intro": f7f0c886 "Key features": 8ca92280 - "Getting started": eed90954 - "Choosing the checkpoint precision": 4a53fdf9 - "Workflow index": bdc3b9f8 - "Setting the output resolution": 1fda252d - "Clip length": 2d495d82 - "Step count": d2a8a6f8 - "Sampler and scheduler": 79c739c3 - "Speeding up generation with Sage Attention": 24cc9a70 - "Speeding up generation with sparse attention": 801c9acf - "Commercial licensing": 201e2de5 + "Choosing a template Workflow": 6dffc9b6 + "Commercial licensing": 3b2a9c1c --- -import UpdateReminder from "/snippets/ko/tutorials/update-reminder.mdx"; - [MiniMax H3](https://www.minimax.io/blog/minimax-h3)는 MiniMax의 오픈 가중치 omni-modal 모델입니다. 텍스트, 이미지, 비디오, 오디오를 단일 컨텍스트에서 이해하고 **네이티브 스테레오 오디오** 비디오(음성, SFX, 음악 일체)를 한 번에 생성합니다. 오픈 가중치는 약 100만 픽셀(단변 768px), 24fps, 최대 약 15초가 목표입니다. 2K는 호스팅 서비스 출력이며 ComfyUI에서는 별도 업스케일이 필요합니다. -문서는 6개 페이지로 나뉩니다: - -- **개요**(이 페이지): 기능, 체크포인트, 워크플로 인덱스, 해상도, 클립 길이, 스텝, 샘플러, 가속 -- **[네이티브 워크플로](/ko/tutorials/video/minimax/minimax-h3-native)**: T2V, I2V, R2V 및 네이티브 노드 기법 -- **[멀티프레임 레퍼런스](/ko/tutorials/video/minimax/minimax-h3-multiframe)**: 타임라인에 레퍼런스 프레임 고정 -- **[Fun ControlNet Union](/ko/tutorials/video/minimax/minimax-h3-fun-controlnet)**: 컨트롤 비디오 또는 마스크 인페인팅 -- **[프롬프트 가이드](/ko/tutorials/video/minimax/minimax-h3-prompt-guide)**: 공식 가이드, 팁, 임베딩 -- **[FastH3](/ko/tutorials/video/minimax/minimax-h3-fastvideo)**: FastVideo 스파스 어텐션 체크포인트 - - -H3의 오픈 가중치는 로컬에서 실행할 수 있습니다. 로컬에서 생성한 출력물을 상업적으로 사용하려면 Comfy(유일한 공식 유통사)를 통해 [MiniMax 상업용 라이선스](https://comfy.org/minimax/license)가 필요합니다. Comfy Cloud에서 생성한 결과물에는 이미 상업적 사용 권한이 포함되어 있습니다. 티어와 가격은 [상업적 라이선스](#상업적-라이선스)를 참조하세요. +H3의 오픈 가중치는 로컬에서 실행할 수 있습니다. 로컬에서 생성한 출력물을 상업적으로 사용하려면 Comfy(유일한 공식 유통사)를 통해 [MiniMax 상업용 라이선스](https://comfy.org/minimax/license)가 필요합니다. Comfy Cloud에서 생성한 결과물에는 이미 상업적 사용 권한이 포함되어 있습니다. ## 주요 기능 @@ -46,210 +26,44 @@ H3의 오픈 가중치는 로컬에서 실행할 수 있습니다. 로컬에서 - **정확한 텍스트 렌더링**: 철자와 브랜드 요소를 선명하게 - **오픈 가중치**: ComfyUI에서 로컬 전체 제어 -## 시작하기 - -1. ComfyUI 업데이트: 기본 T2V/I2V/R2V 템플릿 **0.30.0+**, 멀티프레임 레퍼런스 **0.34.0+**, Fun ControlNet Union·스파스 어텐션·Model Attention Backend **0.35.0+**, FastH3 **0.36.0+** -2. **템플릿 라이브러리** > **비디오** > MiniMax H3 워크플로 선택 -3. 팝업에서 모델 다운로드(수십 GB, 시간·디스크 확보) - -가중치: [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3). - - -풀·pruned가 모두 있으면 **pruned** 사용. pruned는 adaln을 공유 곡선 테이블(`adaln_t_table`)에 두며 ComfyUI가 파일에서 읽습니다. 템플릿은 `minimax_h3_*_pruned_int8_convrot.safetensors` 로드.**풀** 빌드에서 증류한 LoRA의 adaln 텐서는 pruned에 없음(형상 불일치로 스킵). Turbo LoRA는 adaln 없어 양쪽 빌드 가능. - - -## 체크포인트 정밀도 선택 - -VRAM에 맞는 최소 빌드 선택. `UNETLoader` 파일만 변경; 양자화는 checkpoint에서 읽음. LoRA는 빌드 계열 일치(풀 LoRA는 pruned에서 adaln 손실). - -| 빌드(fl2va / ref2va) | 크기 | 비고 | -| --- | --- | --- | -| [`pruned_w6a8`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_w6a8.safetensors) | 16 GB | 최소; INT8 경로; ComfyUI 0.38.0+ | -| [`pruned_int8_convrot`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) | 21 GB | 템플릿 기본 | -| [`pruned_fp8_scaled`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_fp8_scaled.safetensors) | 21 GB | INT8과 동일 크기 | -| [`pruned_bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_bf16.safetensors) | 40 GB | 비양자화 pruned | -| [`bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_bf16.safetensors) | 66 GB | 풀 비양자화 | - -링크는 T2V/I2V `fl2va`; `ref2va`는 같은 폴더·크기.**Comfy Kitchen attention은 `int8_convrot` checkpoint 실행 불가**; 해당 백엔드는 `bf16` 선택. - -VRAM 부족 시 한 단계 축소. CPU offload는 정밀도보다 느림. RTX 30 시리즈 INT8 행렬 약 2× FP16, FP8 경로 없어 동일 크기에서 INT8이 FP8보다 빠른 경우 많음. - -비디오·오디오 VAE 필요: [비디오 fp16/int8_convrot](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/main/vae), [오디오 fp32](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_audio_vae_fp32.safetensors). 템플릿 int8 비디오 + fp32 오디오; int8 비디오는 ComfyUI 0.36.0+ 디코드 약 2×. `VAELoader`에서 교체. - ## 워크플로 인덱스 -템플릿 6개 예시(전체 목록 아님). I2V 이어가기(`video_minimax_h3_i2v_continuation`) 포함. +**템플릿 라이브러리** > **비디오**에서 MiniMax H3 워크플로를 선택하고 팝업에서 모델을 다운로드합니다. 가중치: [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3). + +템플릿 5개 예시(전체 목록 아님): `t2v`, `i2v`, `r2v`, `multiframe_reference`, `fun_controlnet_union`. - 텍스트 프롬프트에서 네이티브 스테레오 오디오가 포함된 비디오를 생성합니다. + 텍스트 프롬프트에서 네이티브 스테레오 오디오가 포함된 비디오를 생성합니다. ComfyUI **0.30.0+**. - 입력 이미지에서 비디오를 생성하며, 선택적으로 첫 번째/마지막 프레임을 제어할 수 있습니다. + 입력 이미지에서 비디오를 생성하며, 선택적으로 첫 번째/마지막 프레임을 제어할 수 있습니다. ComfyUI **0.30.0+**. - 레퍼런스 이미지, 비디오, 오디오에서 캐릭터, 스타일, 모션, 카메라 움직임 또는 음성을 고정합니다. + 레퍼런스 이미지, 비디오, 오디오에서 캐릭터, 스타일, 모션, 카메라 움직임 또는 음성을 고정합니다. ComfyUI **0.30.0+**. - Add Guide 노드를 체인으로 연결해 출력 타임라인의 특정 지점에 레퍼런스 프레임을 고정합니다. + Add Guide 노드를 체인으로 연결해 출력 타임라인의 특정 지점에 레퍼런스 프레임을 고정합니다. ComfyUI **0.34.0+**. - Canny, Depth, HED, MLSD 또는 Pose 제어 비디오로 H3를 구동하거나, 마스크로 비디오 인페인팅을 실행합니다. + Canny, Depth, HED, MLSD 또는 Pose 제어 비디오로 H3를 구동하거나, 마스크로 비디오 인페인팅을 실행합니다. ComfyUI **0.35.0+**(Union 2.0: **0.38.0+**). 스파스 어텐션과 Model Attention Backend도 **0.35.0+** 필요. + + + H3 공식 프롬프트 가이드, 팁, 임베딩 + + + FastVideo 스파스 어텐션 체크포인트와 고속 워크플로. ComfyUI **0.36.0+**. **MiniMax H3 Image to Video**는 T2V·첫/끝 프레임 I2V(`t2va`/`fl2va`), **MiniMax H3 Reference to Video**는 R2V(`ref2va`). - -참조 조건은 샘플러에 도달할 때만 적용. T2V/I2V 템플릿은 서브그래프에서 **Image to Video**만 샘플. 캔버스 **Reference to Video**는 오류 없이 무시. R2V 템플릿 또는 이를 기반한 워크플로 사용. - - -프롬프트: [프롬프트 가이드](/ko/tutorials/video/minimax/minimax-h3-prompt-guide). - -## 출력 해상도 설정 - -**Resolution Selector**가 H3 노드 `width`/`height` 설정: - -- **Aspect ratio**: `16:9 (Widescreen)`, `9:16 (Portrait Widescreen)`, `1:1 (Square)` 등 -- **Megapixels**: 총 픽셀(클수록 느림) -- **Multiple**: 그리드 정렬; H3는 **32** 유지 - -템플릿의 **Megapixels** 기본값은 **0.4**입니다. 16:9에서 **864×480**, 1:1에서 **640×640**(I2V 기본)입니다. 0.4 MP는 빨라서 초안용으로 충분하니, 최종 렌더 전에 **Megapixels**를 올리세요. - -16:9 네이티브: **Megapixels**를 **0.98**로 설정하거나 노드에 **1344 × 768**을 입력합니다. H3의 학습 해상도는 약 1 MP이며 짧은 변 768px, 면적 최대 768×1344입니다. 768×1344를 넘는 크기는 느려질 뿐 디테일이 늘지 않습니다. 학습 해상도에서 멀어질수록 품질도 떨어집니다. 2K는 네이티브 생성 후 별도 업스케일하세요. - -H3 노드는 출력 크기에 768×1344 상한을 두지 않습니다. `width`와 `height`는 **32**의 배수이며 각 변당 최대 16384입니다. **Reference to Video**의 레퍼런스 비디오는 짧은 변 768px, 면적 768×1344에 맞게 축소됩니다. 레퍼런스 이미지는 `ref_image_size`를 따릅니다. **match**는 이번 생성의 픽셀 면적, **max**는 짧은 변 2048px로 축소합니다. - -### 고해상도 업스케일 - -24채널 비디오 latent **latent 업스케일러**로 VAE 왕복 고스팅 방지.[Minimax_h3_latent_Upscaler](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler)(비공식)는 [가중치](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler/blob/main/minimax_h3_latent_upscaler_3d_conv_v1/minimax_h3_latent_upscaler_3d_conv_v1_bf16.safetensors)와 [커스텀 노드](https://github.com/LBH-123-AI/Comfyui_Minimax_h3_latent_Upscaler) 필요. 저해상도 후 **Minimax H3 Latent Upscaler (3D)**(`scale` 1.0–4.0, 기본 2.0), 목표 해상도 재샘플. - -Latent 업스케일은 시간 절약, 피크 VRAM은 아님. 다듬기는 부분 디노이즈: `denoise` **0.1–0.5** 구도 유지; 큰 변경 시만 상향. 다듬기 샘플러는 다단 히스토리 재구성 스텝 충분(「샘플러와 스케줄러」 참고). - -비디오 latent(24)+오디오 latent(32) 분리. 업스케일러는 비디오 공간만; 다듬기에서 둘 디노이즈. 낮은 `denoise`로 1패스 오디오 유지. 완전 일치 시 다듬기 전 `VAEDecodeAudio`로 1패스 오디오를 최종 `CreateVideo`에(`SaveAudioAdvanced`로 무손실). - -## 클립 길이 - -H3는 짧은 클립으로 학습되었습니다. 네이티브 노드는 더 넓은 범위를 받아들이며 초과 길이 요청도 막지 않습니다. - -템플릿은 초 단위 `duration`을 24fps의 **17k+5** 프레임으로 변환합니다. - -| 설정 | 범위 | -| --- | --- | -| `length` 입력 | 5–3600 프레임(약 0.2 s–150 s) | -| 학습 범위 | 약 124–362 프레임(약 5–15 s) | -| 프레임 그리드 | 24fps `17k+5`(124 프레임 ≈ 5.2 s) | -| 템플릿 기본 | 5 s → 124 프레임 | - -`duration`과 `length`는 모두 `17k+5` 그리드로 올림됩니다. 5 s를 지정하면 124 프레임(5.17 s), `length`에 120을 넣어도 124 프레임이 됩니다. 프레임은 0번 프레임부터 17 프레임씩 묶이고, 남는 5 프레임이 마지막 블록입니다. 같은 두 그리드 값 사이의 요청은 같은 클립을 만듭니다. - -긴 클립을 전체 해상도로 생성하면 VRAM이 먼저 부족해집니다. Megapixels를 낮춰 맞추세요. - -### 클립 연결 - -학습 범위 초과는 I2V 이어가기로 각 클립 마지막 프레임부터. 오차 누적(얼굴 텍스처 먼저 열화); turbo/증류는 일찍 「번」. - -`video_minimax_h3_i2v_continuation`(빈 프롬프트): 마지막 프레임 로드 후 다음 구간 설명. 연속 샷은 짧게, 번 전 컷. 긴 연결은 1패스 이후 [H3-Anti-Burn-LoRA](https://huggingface.co/Imagineer13/H3-Anti-Burn-LoRA/blob/main/h3_antiburn_universal_v1.safetensors) `strength_model` 약 0.5. - -## 스텝 수 - -기본(Lightning LoRA **끔**): **20** 스텝. turbo 켬: T2V/I2V(이어가기 포함) **8**, R2V·멀티프레임·Fun ControlNet **4**. T2V/I2V 서브그래프 `turbo_mode`, `turbo_steps`, `turbo_model_strength`. 4스텝 fl2va: [`minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/loras/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors), `turbo_steps` **4**. - -참조 샷은 스텝 더 필요: 참조 토큰 매 스텝; 4스텝 turbo는 참조 거의 미적용(포즈/얼굴 드리프트). 밀착 참조는 turbo 끄거나 **25** 근처. - -증류 schedule은 20스텝 기준보다 디테일 평활. turbo 파일은 모드별; 스타일 LoRA 전 고정 시드 테스트. `turbo_steps`↑ + `turbo_model_strength`↓(<1)로 기본 품질·시간 trade-off. 예: 4스텝 파일 6–8스텝, 강도 ~0.8. - -Turbo는 schedule만 단축, 스텝당 시간 동일(로드 시 병합). 4스텝 LoRA 20스텝 ≈ 기본 20스텝 시간. - -내용별: - -- 단순 샷: **12–16** 스텝 종종 충분 -- 고주파 디테일(체인메일, 필리그리, 작은 물체 다수): ~**50**까지; 미만 시 움직임 중 삼각 격자 아티팩트(turbo worse) -- 모션/프롬프트 이득 대부분 **16** 전; **50** 이후 차이 작음 -- 네이티브 해상도 soft는 대개 해상도 문제 - -오디오는 공동 디노이즈에서 영상보다 늦게 수렴. 음성·음색 **12+**; **8**에서 오디오 약함. - -## 샘플러와 스케줄러 - -템플릿 **`res_multistep`** + **`simple`**. T2V/I2V/FastH3 서브그래프; R2V·멀티프레임·Fun ControlNet 캔버스 `KSamplerSelect`, `BasicScheduler`. - -`res_multistep` 2차 다단(첫 스텝 Euler). 2 샘플러 분할 시 다단 히스토리 손실. 단일 실행 또는 2번째에 충분 스텝. - -기본 shift **12**, `audio_shift` **3**(모델 정의). FastH3 **ModelSamplingMiniMaxH3** `shift_video` **10**, `shift_audio` **3**. 증류 빌드 video shift 오류(8스텝 **3** vs **10**) 격자 아티팩트.[DMAD 4-step LoRA](https://huggingface.co/ZhengmingYu/DMAD/blob/main/minimax_h3/dmad_minimax_h3_4step_full_critic_comfyui.safetensors) shift **12**, `audio_shift` **2**, **`lcm`** + **`simple`**. - -## Sage Attention으로 생성 가속 - -[Sage Attention](https://github.com/woct0rdho/SageAttention) 약 **2×** 가속, 화질 영향 보통 작음(선택 설치): - -1. [releases](https://github.com/woct0rdho/SageAttention/releases)에서 PyTorch/CUDA wheel `pip install` -2. [KJNodes](https://github.com/kijai/ComfyUI-KJNodes) `Patch Sage Attention KJ` -3. `UNETLoader`–`BasicGuider` 사이, `sage_attention` `auto` -4. 또는 `--use-sage-attention` - -일부 H3 레이어는 float16/bfloat16 외 → PyTorch attention 폴백(콘솔 경고 정상). - -### INT8 어텐션 화질 저하 - -클립 말 morph·화면 글자 깨짐은 INT8 attention 양자화 흔함. - -- 템플릿 **`int8_convrot`**. **Comfy Kitchen 미지원**([issue #15529](https://github.com/Comfy-Org/ComfyUI/issues/15529)). 기본 attention 또는 **`pruned_bf16`** 후 백엔드 변경. -- **bf16**에서 **Comfy Kitchen attention**(양자화 전 채널 회전) 유사 속도로 아티팩트 제거. - -`BasicGuider` 모델 경로 **Model Attention Backend**(`comfy kitchen attention`) 또는 `--use-ck-attention`(0.32.0+). `comfy-kitchen` INT8 커널 필요. - -## 스파스 어텐션으로 생성 가속 - -**Model Sparse Attention**(0.35.0+, 실험) 긴 클립 attention 비용 절감. 베이스 H3 **`sol-attn`**(`sla`/`vsa`는 대응 가중치). CUDA + `comfy-kitchen` `sol_attn`, 없으면 dense. - -- 기본 `start_percent` **0.2**, `end_percent` **1.0**. ~**0.4** 시작·**0.9** 종료로 처음/끝 프레임 보호. -- H3 **`sink_conditioning`** **`exact_kv_and_rows`** 유지. -- **`tau`**: 클수록 sparse/빠름(`1.0` ~16% 정확 블록, `1.3` 기본, `2.0` ~2.7%). -- `min_tokens`(기본 **12288**) 미만 이득 작음. - -FastH3 **`vsa`**, `keep_percent` **10**; [FastH3 페이지](/ko/tutorials/video/minimax/minimax-h3-fastvideo). - -### 스파스 어텐션이 실제로 동작하는지 확인 - -베이스 H3 템플릿에는 이 노드가 없습니다. `UNETLoader`와 `BasicGuider` 사이에 **Model Sparse Attention**을 추가한 뒤 **`verbose`**(고급, 기본 꺼짐)를 켜면 attention 형태마다 한 줄씩 로그가 남습니다. - -dense로 남는 호출은 `dense ( tokens): ` 또는 `dense (, , , ): `을 출력하며, 처음 걸린 조건만 보고합니다. - -| 로그 이유 | 조치 | -| --- | --- | -| `no compiled sol_attn kernel for this GPU` | 설치된 `comfy-kitchen`에 이 GPU용 kernel이 없습니다. 업데이트하거나 해당 머신에서는 이 노드를 쓰지 않습니다. | -| ` tokens < min_tokens ` | 해상도나 클립 길이를 올리거나 `min_tokens`를 낮춥니다(기본 **12288**). | -| `sigma outside the start/end window` | `start_percent`와 `end_percent`를 넓힙니다. | -| `block in dense_blocks` | 해당 블록 번호를 `dense_blocks`에서 뺍니다. | -| `no H3 layout for this call` | `vsa`에서만 발생합니다. `sol-attn`으로 바꿉니다. | - -성공한 호출은 `sparse (, , , ), sinks /` 또는 `sparse producer path: tokens, `를 출력합니다. - -`verbose`를 켜도 로그가 없는 경우가 세 가지 있습니다. H3 경로의 활성값이 bfloat16이 아니거나, `head_dim`이 **128**이 아니거나, rope 주파수가 없으면 조용히 dense로 돌아갑니다. - -`vsa`는 FastH3 체크포인트에 묶여 있습니다. 해당 가중치에만 있는 `to_gate_compress` 레이어가 주는 거친 브랜치를 읽기 때문에, 다른 H3 체크포인트에서는 노드가 `VSA: the model has no to_gate_compress layers; running the fine stage without the coarse branch`를 출력하고 세밀 단계만 실행합니다. 이 경고는 `verbose`와 무관합니다. - ## 상업적 라이선스 -H3의 오픈 가중치는 무료로 다운로드하고 실행할 수 있습니다. 로컬에서 생성한 출력물을 상업적으로 사용하려면 Comfy(유일한 공식 유통사)를 통해 판매되는 [MiniMax 상업용 라이선스](https://comfy.org/minimax/license)가 필요합니다. Comfy Cloud에서 생성한 결과물에는 이미 상업적 사용 권한이 포함되어 있으므로, 라이선스가 필요한 것은 로컬 사용의 경우뿐입니다. - -라이선스가 필요한가요? - -- **Comfy Cloud**: 상업적 사용이 포함되어 있습니다. 별도 구매가 필요 없습니다. -- **미국, EU, 영국, 한국 외 지역의 자체 하드웨어에서 실행하고 연 매출이 2,000만 달러 미만**: MiniMax 무료 커뮤니티 라이선스로 상업적 사용이 가능합니다. "Powered by MiniMax H3" 크레딧을 표시하세요. 동일한 지역 규칙이 결과물의 사용 지역에도 적용됩니다. -- **미국, EU, 영국 또는 한국의 자체 하드웨어에서 실행하거나 연 매출이 2,000만 달러 초과**: 아래 두 라이선스 중 하나가 필요합니다. - -라이선스는 두 가지 티어로 제공됩니다: +로컬에서 생성한 출력물의 상업적 사용에는 Comfy 라이선스가 필요합니다. Comfy Cloud 생성물에는 이미 상업적 사용 권한이 포함되어 있습니다. -| | Professional | Enterprise | -| ------------------------- | ---------------------- | ------------------------------------------------------------ | -| 가격 | 월 $5,000부터 | 맞춤형, 연간 계약, 사용량 기준 가격 | -| 계약 기간 | 월 단위 | 최소 12개월 | -| 라이선스 사용자 | 최대 10명 | 상한 없음 | -| 도메인 | 1 | 맞춤 설정 | -| 모델 버전 | Distilled 오픈 가중치 | 모든 버전, undistilled 가중치 및 신규 릴리스 포함 | -| 출력물의 상업적 사용 | 완전한 상업적 사용 권한 | 완전한 상업적 사용 권한 | -| 파인튜닝 및 LoRA | 포함 | 포함 | -| 클라이언트 및 다운스트림 작업 | 포함 | 포함 | - -Professional은 월 $5,000부터입니다. Enterprise는 정가가 없으며 생성량과 팀 규모에 따라 견적을 제공합니다. 두 티어 모두 하나의 계약으로 MiniMax H3와 MiniMax Audio & Music을 포함합니다. [라이선스 요청](https://comfy.org/contact)으로 견적을 받으세요. + + + 라이선스 필요 여부, 커뮤니티·Professional·Enterprise 티어, 견적 요청 방법. + + diff --git a/tutorials/video/minimax/minimax-h3-fastvideo.mdx b/tutorials/video/minimax/minimax-h3-fastvideo.mdx index 64beeec210..7d241f71e6 100644 --- a/tutorials/video/minimax/minimax-h3-fastvideo.mdx +++ b/tutorials/video/minimax/minimax-h3-fastvideo.mdx @@ -131,4 +131,4 @@ Both FastH3 workflows share these nodes with the base H3 setup, with distillatio - **ComfyMathExpression**: Converts the duration input into a valid frame `length` on the 17k+5 grid at 24fps - **Sampler**: `res_multistep` sampler with the `simple` scheduler at 8 steps -The FastH3 weights include `to_gate_compress` gate layers, which VSA reads for its coarse branch. Base H3 checkpoints do not have them. To compare methods, set `method` to `sol-attn` on the **Model Sparse Attention** node and keep the same seed. `sol-attn` needs no matching weights and runs on any H3 checkpoint at the `tau` you set. See [sparse attention](/tutorials/video/minimax/minimax-h3#speeding-up-generation-with-sparse-attention) on the base H3 page. +The FastH3 weights include `to_gate_compress` gate layers, which VSA reads for its coarse branch. Base H3 checkpoints do not have them. To compare methods, set `method` to `sol-attn` on the **Model Sparse Attention** node and keep the same seed. `sol-attn` needs no matching weights and runs on any H3 checkpoint at the `tau` you set. diff --git a/tutorials/video/minimax/minimax-h3-prompt-guide.mdx b/tutorials/video/minimax/minimax-h3-prompt-guide.mdx index 4e910e92d1..f973cd7f8b 100644 --- a/tutorials/video/minimax/minimax-h3-prompt-guide.mdx +++ b/tutorials/video/minimax/minimax-h3-prompt-guide.mdx @@ -29,7 +29,7 @@ Write prompts in **English**. Dialogue/lyrics in `` tags; on-screen text verb 1. **Scene first**: Overall scene, then timed shots inside `[Shot 1]` of `integrated_multimodal_description` 2. **One block**: Shots, camera, and audio together -3. **Resolution**: Native **1344×768** at 16:9; multiples of **32** ([details](/tutorials/video/minimax/minimax-h3#setting-the-output-resolution)) +3. **Resolution**: Native **1344×768** at 16:9; multiples of **32** 4. **Length**: `length` is frames at 24fps (default **124** ≈ 5s), snapped to **17k+5** 5. **On-screen text**: English double quotes per string, verbatim (e.g. `A red neon sign reading "营业中"`). Spoken lines use ``, not quotes 6. **R2V audio markers**: In retention analysis, mark each audio ref as `fully_copy`, `partially_copy`, `reference`, or `weak_reference` to match how the clip is used (see official ref guide table) diff --git a/tutorials/video/minimax/minimax-h3.mdx b/tutorials/video/minimax/minimax-h3.mdx index 8741491142..7d1c3253db 100644 --- a/tutorials/video/minimax/minimax-h3.mdx +++ b/tutorials/video/minimax/minimax-h3.mdx @@ -1,25 +1,13 @@ --- title: "ComfyUI MiniMax H3 Video Generation Guide" -description: "How to use open-weights MiniMax H3 in ComfyUI: text-to-video, image-to-video, and reference-to-video workflows with native stereo audio, prompt writing tips, and Sage Attention speedups." +description: "Run open-weights MiniMax H3 in ComfyUI: text-to-video, image-to-video, and reference-to-video Workflows with native stereo audio." sidebarTitle: "Overview" --- -import UpdateReminder from "/snippets/tutorials/update-reminder.mdx"; - [MiniMax H3](https://www.minimax.io/blog/minimax-h3) is MiniMax's open-weights omni-modal model. It understands text, images, video, and audio in one context and generates video with **native stereo audio** (voice, SFX, and music in a single pass). Open weights target about 1 megapixel (768px short edge) at 24fps for up to ~15 seconds. 2K is a hosted-service output and needs a separate upscale pass in ComfyUI. -Documentation is split across six pages: - -- **Overview** (this page): capabilities, checkpoints, workflow index, resolution, clip length, steps, sampler, speedups -- **[Native workflows](/tutorials/video/minimax/minimax-h3-native)**: T2V, I2V, R2V, and native-node techniques -- **[Multiframe Reference](/tutorials/video/minimax/minimax-h3-multiframe)**: anchor reference frames on the timeline -- **[Fun ControlNet Union](/tutorials/video/minimax/minimax-h3-fun-controlnet)**: control video or inpainting with a mask -- **[Prompt guide](/tutorials/video/minimax/minimax-h3-prompt-guide)**: official guides, tips, embeddings -- **[FastH3](/tutorials/video/minimax/minimax-h3-fastvideo)**: FastVideo sparse-attention checkpoints - - -H3's open weights let you run the model locally. Commercial use of locally generated outputs requires a [MiniMax commercial license](https://comfy.org/minimax/license), available through Comfy, the only official reseller. Generations on Comfy Cloud already include commercial rights. See [Commercial licensing](#commercial-licensing) for tiers and pricing. +H3's open weights let you run the model locally. Commercial use of locally generated outputs requires a [MiniMax commercial license](https://comfy.org/minimax/license), available through Comfy, the only official reseller. Generations on Comfy Cloud already include commercial rights. ## Key features @@ -31,210 +19,47 @@ H3's open weights let you run the model locally. Commercial use of locally gener - **Accurate text rendering**: Clean spelled-out text and brand elements - **Open weights**: Full local control in ComfyUI -## Getting started - -1. Update ComfyUI: base T2V/I2V/R2V templates need **0.30.0+**; Multiframe Reference **0.34.0+**; Fun ControlNet Union, sparse attention, and Model Attention Backend **0.35.0+**; FastH3 **0.36.0+** -2. **Template Library** > **Video** > pick a MiniMax H3 workflow -3. Download models from the pop-up (tens of GB; allow time and disk space) - -Weights live on Hugging Face: [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3). - - -Use **pruned** checkpoints when both full and pruned builds exist. Pruned builds store adaln in a shared curve table (`adaln_t_table`) that ComfyUI reads from the file; templates load `minimax_h3_*_pruned_int8_convrot.safetensors`. LoRAs distilled on **full** builds carry adaln tensors that do not exist on pruned builds (shape mismatch; those weights are skipped). Turbo LoRAs have no adaln tensors and work on either build. - - -## Choosing the checkpoint precision - -Pick the smallest build that fits in VRAM. Change only the `UNETLoader` file; ComfyUI reads quantization from the checkpoint. LoRAs must match the build family (full-build LoRAs lose adaln on pruned). +## Choosing a template Workflow -| Build (fl2va / ref2va) | Size | Notes | -| --- | --- | --- | -| [`pruned_w6a8`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_w6a8.safetensors) | 16 GB | Smallest; INT8 path; ComfyUI 0.38.0+ | -| [`pruned_int8_convrot`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) | 21 GB | Default in templates | -| [`pruned_fp8_scaled`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_fp8_scaled.safetensors) | 21 GB | Same size as INT8 | -| [`pruned_bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_bf16.safetensors) | 40 GB | Unquantized pruned | -| [`bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_bf16.safetensors) | 66 GB | Full unquantized build | +Pick a Workflow from **Template Library** > **Video** and download models from the pop-up. Weights: [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3). -Links are `fl2va` (T2V/I2V); `ref2va` files are in the same folder at the same sizes. **Comfy Kitchen attention cannot run `int8_convrot` checkpoints**; use a `bf16` build with that backend. - -If VRAM is tight, step down a size: CPU offload costs more than precision tradeoffs. On RTX 30-series, INT8 matrix ops are ~2× FP16 and there is no FP8 path, so INT8 often beats FP8 at the same file size. - -H3 also needs video and audio VAEs: [video fp16 / int8_convrot](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/main/vae) and [audio fp32](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_audio_vae_fp32.safetensors). Templates use int8 video + fp32 audio; int8 video decodes ~2× faster on ComfyUI 0.36.0+. Swap files on `VAELoader` like the diffusion model. - -## Workflow index - -Six template workflows ship today (examples, not an exhaustive list). The library also includes an I2V continuation variant (`video_minimax_h3_i2v_continuation`). +Five `video_minimax_h3_*` template Workflows are available (examples, not an exhaustive list): `t2v`, `i2v`, `r2v`, `multiframe_reference`, and `fun_controlnet_union`. - Generate videos from text prompts with native stereo audio + Generate videos from text prompts with native stereo audio. ComfyUI **0.30.0+**. - Generate videos from an input image, with optional first/last-frame control + Generate videos from an input image, with optional first/last-frame control. ComfyUI **0.30.0+**. - Lock in a character, style, motion, camera move, or voice from reference images, videos, and audio + Lock in a character, style, motion, camera move, or voice from reference images, videos, and audio. ComfyUI **0.30.0+**. - Anchor reference frames at specific points along the output timeline with chained Add Guide nodes + Anchor reference frames at specific points along the output timeline with chained Add Guide Nodes. ComfyUI **0.34.0+**. - Drive H3 with a Canny, Depth, HED, MLSD, or Pose control video, or run video inpainting with a mask + Drive H3 with a Canny, Depth, HED, MLSD, or Pose control video, or run video inpainting with a mask. ComfyUI **0.35.0+** (Union 2.0: **0.38.0+**). Sparse attention and `Model Attention Backend` also need **0.35.0+**. + + + Official prompt guides, tips, and embeddings for H3 + + + FastVideo sparse-attention checkpoints and speed-focused Workflows. ComfyUI **0.36.0+**. -**MiniMax H3 Image to Video** covers T2V and first/last-frame I2V (`t2va` / `fl2va`). **MiniMax H3 Reference to Video** covers R2V (`ref2va`). - - -Reference conditioning only applies when it reaches the sampler. T2V/I2V templates sample inside a subgraph wired to **Image to Video** only. A **Reference to Video** node on the canvas is ignored without error. Use the R2V template (or a workflow built from it) for reference-driven output. - - -Prompt resources: [prompt guide](/tutorials/video/minimax/minimax-h3-prompt-guide). - -## Setting the output resolution - -**Resolution Selector** sets `width` and `height` on the H3 node: - -- **Aspect ratio**: Presets such as `16:9 (Widescreen)`, `9:16 (Portrait Widescreen)`, `1:1 (Square)` -- **Megapixels**: Total pixel count (higher = larger, slower) -- **Multiple**: Round to this grid; keep **32** for H3 - -Templates open at **Megapixels** **0.4**: **864×480** at 16:9, **640×640** at 1:1 (the I2V default). A 0.4 MP render is fast and fine for drafts; raise **Megapixels** before a final render. - -For 16:9 native quality, set **Megapixels** to **0.98** or enter **1344 × 768** on the node. H3 is trained near 1 MP, with a 768-pixel short edge and up to a 768×1344 area. Sizes above 768×1344 render slower without adding detail, and quality drops the further you move from the trained resolution. For 2K, generate at native size and upscale separately. - -The H3 nodes have no 768×1344 cap on output size: `width` and `height` step by **32** up to 16384 per axis. Reference videos on **Reference to Video** are downscaled to fit a 768px short edge and a 768×1344 area. Reference images follow `ref_image_size`: **match** scales them to the generation's pixel area, **max** to a 2048px short edge. - -### Upscaling to higher resolution - -Use a **latent upscaler** on the 24-channel video latent to avoid VAE round-trip ghosting. [Minimax_h3_latent_Upscaler](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler) (unofficial) needs [minimax_h3_latent_upscaler_3d_conv_v1_bf16.safetensors](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler/blob/main/minimax_h3_latent_upscaler_3d_conv_v1/minimax_h3_latent_upscaler_3d_conv_v1_bf16.safetensors) in `ComfyUI/models/latent_upscale_models/` and its [custom node](https://github.com/LBH-123-AI/Comfyui_Minimax_h3_latent_Upscaler). Chain **Minimax H3 Latent Upscaler (3D)** after a low-res pass (`scale` 1.0–4.0, default 2.0), then re-sample at target resolution. - -Latent upscale saves time, not peak VRAM (refine still runs at target size). Treat refine as partial denoise: `denoise` **0.1–0.5** keeps composition; go higher only to rework the first pass. Give the refine sampler enough steps to rebuild multistep history (see Sampler and scheduler). - -Video and audio latents are separate (24 + 32 channels). The upscaler only spatially enlarges video; audio is unchanged until refine denoises both. Low refine `denoise` preserves first-pass audio. To keep audio exactly, decode the first pass with `VAEDecodeAudio` before refine and wire that track into final `CreateVideo` (add `SaveAudioAdvanced` for a lossless export). - -## Clip length - -H3 is trained on short clips; native nodes accept a wider range without blocking over-length requests. - -Templates expose `duration` in seconds, converted to frames on the `17k+5` grid at 24fps. - -| Setting | Range | -| --- | --- | -| `length` input | 5–3600 frames (~0.2 s–150 s) | -| Trained range | ~124–362 frames (~5–15 s) | -| Frame grid | `17k+5` at 24 fps (124 frames ≈ 5.2 s) | -| Template default | 5 s → 124 frames | - -`duration` and `length` round **up** to the next `17k+5` value: a 5 s request renders 124 frames (5.17 s), and a `length` of 120 also renders 124. Frames pack from frame 0 in 17-frame blocks, so the leftover 5 frames are the last block, not the first. Requests that fall between the same two grid points render the same clip. - -Long clips at full resolution exhaust VRAM first; lower megapixels to fit. - -### Chaining clips - -Beyond the trained range, chain I2V continuations from each clip's last frame. Errors compound (faces lose texture first); turbo/distilled schedules show burn sooner. +Two templates cover several modes: -Use `video_minimax_h3_i2v_continuation` (empty prompt): load the previous last frame, describe the next segment. Prefer short continuous shots and cut before burn shows. For longer chains, [H3-Anti-Burn-LoRA](https://huggingface.co/Imagineer13/H3-Anti-Burn-LoRA/blob/main/h3_antiburn_universal_v1.safetensors) on clips after the first at `strength_model` ~0.5 (tune for your continuation style). - -## Step count - -Defaults (Lightning LoRA **off**): **20 steps**. With turbo on: **8** for T2V/I2V (and continuation), **4** for R2V, Multiframe, and Fun ControlNet. On T2V/I2V subgraphs, `turbo_mode`, `turbo_steps`, and `turbo_model_strength` control the distilled LoRA. A 4-step fl2va file is also listed: [`minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/loras/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors) with `turbo_steps` **4**. - -Reference shots need more steps: reference tokens ride every step, so 4-step turbo can barely apply references (pose/face drift). For tight reference match, keep turbo off or raise toward **25**. - -Distilled schedules smooth fine detail (skin, fabric, hair) vs 20-step base. Each turbo file is mode-specific; test at a fixed seed before stacking style LoRAs. `turbo_steps` and `turbo_model_strength` are adjustable: higher steps + lower strength (less than 1) move back toward base quality and cost time. Example: 4-step file at 6–8 steps, strength ~0.8. - -Turbo LoRAs shorten the schedule, not per-step time (merged at load). Running a 4-step LoRA at 20 steps takes about as long as base 20 steps. - -Guidance by content: - -- Simple shots: **12–16** steps often enough -- High-frequency detail (chainmail, filigree, many small objects): improves up to ~**50**; below that, triangular grid artifacts under motion (worse with turbo) -- Most motion/prompt gains by step **16**; little visible change past **50** -- Soft frames at native resolution are usually a resolution issue, not steps - -Audio converges later than video in the joint denoise. Speech and timbre need **12+** steps; at **8** steps audio is often the weak link. - -## Sampler and scheduler - -Templates use **`res_multistep`** + **`simple`**. T2V/I2V/FastH3 hide these inside the subgraph; R2V, Multiframe, and Fun ControlNet expose `KSamplerSelect` and `BasicScheduler` on canvas. - -`res_multistep` is second-order multistep (first step is Euler). Splitting the schedule across two samplers drops multistep history: the second sampler's first step is first-order again. Keep one sampler run, or give the second enough steps to warm up. - -Default H3 shifts are `shift` **12** and `audio_shift` **3** from the model definition (no extra node). FastH3 templates set **ModelSamplingMiniMaxH3** to `shift_video` **10**, `shift_audio` **3**. Wrong video shift on distilled builds (e.g. **3** instead of **10** on 8-step) can show grid artifacts. Custom finetunes may need their own pair on **ModelSamplingMiniMaxH3** (see the file's model card). [DMAD 4-step LoRA](https://huggingface.co/ZhengmingYu/DMAD/blob/main/minimax_h3/dmad_minimax_h3_4step_full_critic_comfyui.safetensors) uses `shift` **12**, `audio_shift` **2**, **`lcm`** + **`simple`**. - -## Speeding up generation with Sage Attention - -[Sage Attention](https://github.com/woct0rdho/SageAttention) can roughly **2×** speed with small quality impact (optional install): - -1. `pip install` the wheel matching your PyTorch/CUDA from [releases](https://github.com/woct0rdho/SageAttention/releases) -2. Install [KJNodes](https://github.com/kijai/ComfyUI-KJNodes) for `Patch Sage Attention KJ` -3. Insert between `UNETLoader` and `BasicGuider`; set `sage_attention` to `auto` -4. Or launch with `--use-sage-attention` - -Sage needs float16/bfloat16; some H3 layers use other dtypes and fall back to PyTorch attention (console warnings are normal). - -### Quality degradation with INT8 attention - -End-of-clip morphing or garbled on-screen text with Sage often comes from INT8 attention quantization (hot channels in late blocks). - -- Templates use **`int8_convrot`** checkpoints. **Comfy Kitchen does not support them** ([issue #15529](https://github.com/Comfy-Org/ComfyUI/issues/15529)). Use default attention, or switch `UNETLoader` to **`pruned_bf16`** then change backend. -- On **bf16** checkpoints, **Comfy Kitchen attention** (channel rotation before quantize) clears artifacts at similar speed. - -Add **Model Attention Backend** (`comfy kitchen attention`) on the model path to `BasicGuider` (after LoRA/turbo), or use `--use-ck-attention` (0.32.0+). Requires `comfy-kitchen` INT8 kernels on your hardware. - -## Speeding up generation with sparse attention - -**Model Sparse Attention** (0.35.0+, experimental) cuts attention cost on long clips. For base H3 use `method` **`sol-attn`** (`sla`/`vsa` need matching weights). Needs CUDA + `sol_attn` from `comfy-kitchen`; otherwise layers stay dense. - -- Defaults `start_percent` **0.2**, `end_percent` **1.0**. Later start (~**0.4**) and earlier end (~**0.9**) protect opening/closing frames. -- Keep **`sink_conditioning`** at **`exact_kv_and_rows`** on H3 (protects packed text/audio/reference rows). -- **`tau`**: higher = sparser/faster (`1.0` ~16% exact blocks, `1.3` default, `2.0` ~2.7%). -- Short sequences below `min_tokens` (default **12288**) see little gain. - -FastH3 uses **`vsa`** at `keep_percent` **10**; see [FastH3 page](/tutorials/video/minimax/minimax-h3-fastvideo). - -### Checking whether sparse attention is active - -Base H3 templates do not include the node. Add **Model Sparse Attention** between `UNETLoader` and `BasicGuider`, then turn on **`verbose`** (Advanced, off by default) to log one line per attention shape. - -Calls that stay dense log `dense ( tokens): ` or `dense (, , , ): `. Only the first failing condition is reported: - -| Logged reason | What to change | -| --- | --- | -| `no compiled sol_attn kernel for this GPU` | The installed `comfy-kitchen` has no kernel for your GPU. Update it, or leave the node out on that machine. | -| ` tokens < min_tokens ` | Raise the resolution or clip length, or lower `min_tokens` (default **12288**). | -| `sigma outside the start/end window` | Widen `start_percent` and `end_percent`. | -| `block in dense_blocks` | Remove that block index from `dense_blocks`. | -| `no H3 layout for this call` | `vsa` only. Select `sol-attn`. | - -Calls that succeed log `sparse (, , , ), sinks /` or `sparse producer path: tokens, `. - -Three conditions never log, even with `verbose` on: activations that are not bfloat16 on the H3 path, a `head_dim` other than **128**, and missing rope frequencies all fall back silently. - -`vsa` is bound to the FastH3 checkpoint. It reads a learned coarse branch from `to_gate_compress` layers that only those weights carry, so on any other H3 checkpoint the node prints `VSA: the model has no to_gate_compress layers; running the fine stage without the coarse branch` and runs the fine stage alone. That warning is not gated by `verbose`. +- `MiniMax H3 Image to Video` covers T2V and first/last-frame I2V (`t2va` / `fl2va`). +- `MiniMax H3 Reference to Video` covers R2V (`ref2va`). ## Commercial licensing -H3's open weights are free to download and run. Using locally generated outputs commercially requires a [MiniMax commercial license](https://comfy.org/minimax/license), sold through Comfy, the only official reseller. Generations on Comfy Cloud already include commercial rights, so a license is only needed for local use. - -Do you need one? - -- **Comfy Cloud**: commercial use is included. Nothing to buy. -- **Your own hardware, outside the US, EU, UK, and Korea, under $20M in yearly revenue**: the free MiniMax community license covers commercial use. Show a "Powered by MiniMax H3" credit; the same territory rule applies to where your outputs are used. -- **Your own hardware in the US, EU, UK, or Korea, or over $20M in yearly revenue**: you need one of the two licenses below. - -Licenses come in two tiers: +Commercial use of locally generated outputs requires a license from Comfy. Comfy Cloud generations already include commercial rights. -| | Professional | Enterprise | -| ------------------------- | ---------------------- | ------------------------------------------------------------ | -| Price | From $5,000 per month | Custom, annual agreement, priced to your volume | -| Term | Monthly | 12-month minimum | -| Licensed users | Up to 10 | No cap | -| Domains | 1 | Custom | -| Model versions | Distilled open weights | All versions, undistilled weights and new releases included | -| Commercial use of outputs | Full commercial rights | Full commercial rights | -| Fine-tuning and LoRA | Included | Included | -| Client and downstream work | Included | Included | - -Professional starts at $5,000 per month. Enterprise has no flat list price; it is quoted to your generation volume and team. Both tiers cover MiniMax H3 plus MiniMax Audio & Music under one agreement. [Request a license](https://comfy.org/contact) to get a quote. + + + When you need a license, community vs Professional and Enterprise tiers, and how to request a quote. + + diff --git a/zh/tutorials/video/minimax/minimax-h3-fastvideo.mdx b/zh/tutorials/video/minimax/minimax-h3-fastvideo.mdx index 16e58ae98e..f81cea9ddf 100644 --- a/zh/tutorials/video/minimax/minimax-h3-fastvideo.mdx +++ b/zh/tutorials/video/minimax/minimax-h3-fastvideo.mdx @@ -140,4 +140,4 @@ ComfyUI/ - **ComfyMathExpression**:将时长输入转换为 24fps 下 17k+5 网格上的有效帧 `length` - **采样器**:`res_multistep` 采样器,`simple` 调度器,8 步 -FastH3 权重带有 `to_gate_compress` 门控层,VSA 的粗粒度分支读的就是它。基座 H3 检查点没有这些层。要比较两种方法,把 **Model Sparse Attention** 节点的 `method` 设为 `sol-attn`,并保持同一随机种子。`sol-attn` 不需要匹配权重,在任意 H3 检查点上按你设的 `tau` 运行。详见基座 H3 页面的[稀疏注意力](/zh/tutorials/video/minimax/minimax-h3#使用稀疏注意力加速生成)。 +FastH3 权重带有 `to_gate_compress` 门控层,VSA 的粗粒度分支读的就是它。基座 H3 检查点没有这些层。要比较两种方法,把 **Model Sparse Attention** 节点的 `method` 设为 `sol-attn`,并保持同一随机种子。`sol-attn` 不需要匹配权重,在任意 H3 检查点上按你设的 `tau` 运行。 diff --git a/zh/tutorials/video/minimax/minimax-h3-prompt-guide.mdx b/zh/tutorials/video/minimax/minimax-h3-prompt-guide.mdx index 2b69cde3df..d6e31b9af0 100644 --- a/zh/tutorials/video/minimax/minimax-h3-prompt-guide.mdx +++ b/zh/tutorials/video/minimax/minimax-h3-prompt-guide.mdx @@ -38,7 +38,7 @@ non_diegetic_music: ... 1. **先场景**:总述后写 `[Shot 1]` 内分镜 2. **一块写完**:镜头、运镜、音频 -3. **分辨率**:16:9 原生 **1344×768**;**32** 倍数([详情](/zh/tutorials/video/minimax/minimax-h3#设置输出分辨率)) +3. **分辨率**:16:9 原生 **1344×768**;**32** 倍数 4. **长度**:`length` 为 24fps 帧数(默认 **124** ≈ 5s),吸附 **17k+5** 5. **屏幕文字**:英文双引号、逐条原文(如 `A red neon sign reading "营业中"`);对白用 `` 6. **R2V 音频标记**:`fully_copy`、`partially_copy`、`reference`、`weak_reference`(见官方 ref 表) diff --git a/zh/tutorials/video/minimax/minimax-h3.mdx b/zh/tutorials/video/minimax/minimax-h3.mdx index 71ee2b5e31..3506b299d8 100644 --- a/zh/tutorials/video/minimax/minimax-h3.mdx +++ b/zh/tutorials/video/minimax/minimax-h3.mdx @@ -1,40 +1,20 @@ --- title: "ComfyUI MiniMax H3 视频生成指南" -description: "如何在 ComfyUI 中使用开放权重的 MiniMax H3:文生视频、图生视频、参考生视频工作流,支持原生立体声音频,附提示词编写技巧与 Sage Attention 加速方法。" +description: "如何在 ComfyUI 中使用开放权重的 MiniMax H3:文生视频、图生视频、参考生视频工作流与原生立体声音频,以及各专题指南入口。" sidebarTitle: "概述" -translationSourceHash: e95e545e +translationSourceHash: d65cf3e6 translationFrom: tutorials/video/minimax/minimax-h3.mdx translationBlockHashes: - "_intro": 94f54ee8 + "_intro": f7f0c886 "Key features": 8ca92280 - "Getting started": eed90954 - "Choosing the checkpoint precision": 4a53fdf9 - "Workflow index": bdc3b9f8 - "Setting the output resolution": 1fda252d - "Clip length": 2d495d82 - "Step count": d2a8a6f8 - "Sampler and scheduler": 79c739c3 - "Speeding up generation with Sage Attention": 24cc9a70 - "Speeding up generation with sparse attention": 801c9acf - "Commercial licensing": 201e2de5 + "Choosing a template Workflow": 6dffc9b6 + "Commercial licensing": 3b2a9c1c --- -import UpdateReminder from "/snippets/zh/tutorials/update-reminder.mdx"; - [MiniMax H3](https://www.minimax.io/blog/minimax-h3) 是 MiniMax 的开放权重全模态模型,在单一上下文中理解文本、图像、视频与音频,并在单次前向中生成带**原生立体声音频**的视频(语音、音效、音乐一体)。开放权重约以 100 万像素(短边 768px)、24fps 生成最长约 15 秒。2K 来自托管服务,在 ComfyUI 中需单独放大。 -文档分为六个页面: - -- **概述**(本页):能力、检查点、工作流索引、分辨率、片段时长、步数、采样器、加速 -- **[原生工作流](/zh/tutorials/video/minimax/minimax-h3-native)**:T2V、I2V、R2V 与原生节点技巧 -- **[多帧参考](/zh/tutorials/video/minimax/minimax-h3-multiframe)**:在时间线上锚定参考帧 -- **[Fun ControlNet Union](/zh/tutorials/video/minimax/minimax-h3-fun-controlnet)**:控制视频或遮罩修补 -- **[提示词指南](/zh/tutorials/video/minimax/minimax-h3-prompt-guide)**:官方指南、技巧、嵌入 -- **[FastH3](/zh/tutorials/video/minimax/minimax-h3-fastvideo)**:FastVideo 稀疏注意力检查点 - - -H3 的开放权重可在本地运行。对本地生成的输出进行商业使用,需要通过 Comfy(唯一官方经销商)购买 [MiniMax 商业许可](https://comfy.org/minimax/license)。Comfy Cloud 上的生成已包含商业使用权。档位与定价见 [商业许可](#商业许可)。 +H3 的开放权重可在本地运行。对本地生成的输出进行商业使用,需要通过 Comfy(唯一官方经销商)购买 [MiniMax 商业许可](https://comfy.org/minimax/license)。Comfy Cloud 上的生成已包含商业使用权。 ## 主要功能 @@ -46,210 +26,44 @@ H3 的开放权重可在本地运行。对本地生成的输出进行商业使 - **准确文本渲染**:清晰拼写与品牌元素 - **开放权重**:ComfyUI 本地全参数控制 -## 入门 - -1. 更新 ComfyUI:基础 T2V/I2V/R2V 模板需 **0.30.0+**;多帧参考 **0.34.0+**;Fun ControlNet Union、稀疏注意力与 Model Attention Backend **0.35.0+**;FastH3 **0.36.0+** -2. **模板库** > **视频** > 选择 MiniMax H3 工作流 -3. 按弹窗下载模型(数十 GB,预留时间与磁盘) - -权重托管于 [Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3)。 - - -仓库同时提供完整与 pruned 构建时,请用 **pruned**。pruned 将 adaln 存入共享曲线表(`adaln_t_table`),ComfyUI 从文件读取;模板加载 `minimax_h3_*_pruned_int8_convrot.safetensors`。在**完整**构建上蒸馏的 LoRA 含 adaln 张量,pruned 无对应项(形状不匹配,权重被跳过)。Turbo LoRA 无 adaln 张量,两种构建均可加载。 - - -## 选择检查点精度 - -选能放进显存的最小构建。仅改 `UNETLoader` 文件即可;量化由 checkpoint 声明。LoRA 须与构建系列匹配(完整构建 LoRA 在 pruned 上会丢失 adaln)。 - -| 构建(fl2va / ref2va) | 大小 | 说明 | -| --- | --- | --- | -| [`pruned_w6a8`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_w6a8.safetensors) | 16 GB | 最小;INT8 路径;ComfyUI 0.38.0+ | -| [`pruned_int8_convrot`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) | 21 GB | 模板默认 | -| [`pruned_fp8_scaled`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_fp8_scaled.safetensors) | 21 GB | 与 INT8 同尺寸 | -| [`pruned_bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_bf16.safetensors) | 40 GB | 未量化 pruned | -| [`bf16`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_bf16.safetensors) | 66 GB | 完整未量化构建 | - -链接为 T2V/I2V 的 `fl2va`;`ref2va` 同目录同尺寸。**Comfy Kitchen attention 无法运行 `int8_convrot` checkpoint**,使用该后端时请选 `bf16`。 - -显存不足请降一档:CPU offload 比精度取舍更慢。RTX 30 系上 INT8 矩阵约 2× FP16,且无 FP8 路径,同尺寸下 INT8 常快于 FP8。 - -还需视频与音频 VAE:[视频 fp16/int8_convrot](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/main/vae) 与 [音频 fp32](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_audio_vae_fp32.safetensors)。模板为 int8 视频 + fp32 音频;int8 视频在 ComfyUI 0.36.0+ 解码约快 2 倍。在 `VAELoader` 上换文件即可。 - ## 工作流索引 -当前模板库提供六个示例工作流(非穷尽)。另有 I2V 续接变体(`video_minimax_h3_i2v_continuation`)。 +在 **模板库** > **视频** 中选择 MiniMax H3 工作流,并按弹窗下载模型。权重:[Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3)。 + +当前模板库提供五个示例工作流(非穷尽):`t2v`、`i2v`、`r2v`、`multiframe_reference`、`fun_controlnet_union`。 - 根据文本提示词生成视频,并带有原生立体声音频 + 根据文本提示词生成视频,并带有原生立体声音频。ComfyUI **0.30.0+**。 - 根据输入图像生成视频,并支持可选的首帧/尾帧控制 + 根据输入图像生成视频,并支持可选的首帧/尾帧控制。ComfyUI **0.30.0+**。 - 通过参考图像、视频和音频,锁定角色、风格、动作、相机运动或声音 + 通过参考图像、视频和音频,锁定角色、风格、动作、相机运动或声音。ComfyUI **0.30.0+**。 - 使用链式连接的 Add Guide 节点,将参考帧锚定在输出时间线上的指定位置 + 使用链式连接的 Add Guide 节点,将参考帧锚定在输出时间线上的指定位置。ComfyUI **0.34.0+**。 - 使用 Canny、Depth、HED、MLSD 或 Pose 控制视频驱动 H3,或使用遮罩执行视频 inpainting + 使用 Canny、Depth、HED、MLSD 或 Pose 控制视频驱动 H3,或使用遮罩执行视频 inpainting。ComfyUI **0.35.0+**(Union 2.0:**0.38.0+**)。稀疏注意力与 Model Attention Backend 同样需要 **0.35.0+**。 + + + H3 官方提示词指南、技巧与 embedding + + + FastVideo 稀疏注意力检查点与提速工作流。ComfyUI **0.36.0+**。 **MiniMax H3 Image to Video** 覆盖 T2V 与首尾帧 I2V(`t2va`/`fl2va`)。**MiniMax H3 Reference to Video** 覆盖 R2V(`ref2va`)。 - -参考条件仅在与采样器连通时生效。T2V/I2V 模板在子图内采样,仅接 **Image to Video**。画布上的 **Reference to Video** 会被静默忽略。请用 R2V 模板或基于它的工作流。 - - -提示词资源:[提示词指南](/zh/tutorials/video/minimax/minimax-h3-prompt-guide)。 - -## 设置输出分辨率 - -**Resolution Selector** 设置 H3 节点的 `width`/`height`: - -- **Aspect ratio**:如 `16:9 (Widescreen)`、`9:16 (Portrait Widescreen)`、`1:1 (Square)` -- **Megapixels**:总像素(越大越慢) -- **Multiple**:对齐网格;H3 保持 **32** - -模板默认 **Megapixels** 为 **0.4**:16:9 下 **864×480**,1:1 下 **640×640**(I2V 默认)。0.4 MP 出片快,适合草稿;正式出片前请调高 **Megapixels**。 - -16:9 原生画质:**Megapixels** 设 **0.98**,或在节点填 **1344 × 768**。H3 的训练分辨率约为 1 MP,短边 768px,面积上限 768×1344。超过 768×1344 只会更慢,不增加细节;离训练分辨率越远,画质越差。2K 请原生生成后单独放大。 - -H3 节点不会对输出尺寸设 768×1344 上限:`width` 与 `height` 以 **32** 为步长,单边最大 16384。**Reference to Video** 的参考视频会缩小到短边 768px、面积 768×1344 的范围。参考图像按 `ref_image_size` 处理:**match** 缩放到本次生成的像素面积,**max** 缩放到短边 2048px。 - -### 放大到更高分辨率 - -对 24 通道视频 latent 使用 **latent 放大器**,避免 VAE 往返鬼影。[Minimax_h3_latent_Upscaler](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler)(非官方)需 [权重文件](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler/blob/main/minimax_h3_latent_upscaler_3d_conv_v1/minimax_h3_latent_upscaler_3d_conv_v1_bf16.safetensors) 与 [自定义节点](https://github.com/LBH-123-AI/Comfyui_Minimax_h3_latent_Upscaler)。低分辨率生成后接 **Minimax H3 Latent Upscaler (3D)**(`scale` 1.0–4.0,默认 2.0),再按目标分辨率重采样。 - -Latent 放大省时间不省峰值显存。精修作部分去噪:`denoise` **0.1–0.5** 保留构图;仅首段需大改时提高。精修采样器需足够步数以重建多步历史(见「采样器与调度器」)。 - -视频与音频 latent 分离(24+32 通道)。放大器只放大视频空间;精修会同时去噪音频。低 `denoise` 可保留首段音频。若要完全一致,精修前用 `VAEDecodeAudio` 解码首段音频并接到最终 `CreateVideo`(可用 `SaveAudioAdvanced` 导出无损)。 - -## 片段时长 - -H3 在短片段上训练;节点接受更宽范围且不阻止超长请求。 - -模板以秒设置 `duration`,在 24fps 下换算为 **17k+5** 帧网格。 - -| 设置 | 范围 | -| --- | --- | -| `length` 输入 | 5–3600 帧(约 0.2 s–150 s) | -| 训练范围 | 约 124–362 帧(约 5–15 s) | -| 帧网格 | 24fps 下 `17k+5`(124 帧 ≈ 5.2 s) | -| 模板默认 | 5 s → 124 帧 | - -`duration` 与 `length` 都向上取整到 `17k+5` 网格:5 s 渲染 124 帧(5.17 s),`length` 填 120 也是 124 帧。帧从第 0 帧起按 17 帧分块,余下的 5 帧在最后一块,不在开头。落在同两个网格值之间的请求得到相同片段。 - -长片段在满分辨率下先耗尽显存;可降低 Megapixels。 - -### 片段衔接 - -超出训练范围时用 I2V 续接上一段末帧。误差会累积(面部纹理先劣化);turbo/蒸馏步数更早出现「烧片」。 - -使用 `video_minimax_h3_i2v_continuation`(空提示词):载入末帧并描述下一段。连续镜头宜短,烧片前切镜。更长链可在首段之后加载 [H3-Anti-Burn-LoRA](https://huggingface.co/Imagineer13/H3-Anti-Burn-LoRA/blob/main/h3_antiburn_universal_v1.safetensors),`strength_model` 约 0.5(按续接方式微调)。 - -## 步数 - -默认(关闭 Lightning LoRA):**20** 步。开启 turbo:T2V/I2V(含续接)**8** 步;R2V、多帧、Fun ControlNet **4** 步。T2V/I2V 子图用 `turbo_mode`、`turbo_steps`、`turbo_model_strength`。另有 4 步 fl2va 文件:[`minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors`](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/loras/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors),`turbo_steps` 设为 **4**。 - -参考镜头需更多步数:参考 token 每步都参与,4 步 turbo 可能几乎贴不上参考(姿态/面部漂移)。需紧贴参考时关闭 turbo 或提高到约 **25**。 - -蒸馏步数比 20 步基线更平滑细节。各 turbo 文件按模式训练;叠风格 LoRA 前请固定种子测试。可提高 `turbo_steps` 并降低 `turbo_model_strength`(小于 1)换回基线质感。例:4 步文件用 6–8 步、强度约 0.8。 - -Turbo 缩短的是 schedule,不是单步耗时(加载时合并)。4 步 LoRA 跑 20 步约等于基线 20 步耗时。 - -按内容: - -- 简单镜头:**12–16** 步常够 -- 高频细节(链甲、花纹、大量小物体):可改善至约 **50**;更低易出现运动下三角网格伪影(turbo 更严重) -- 运动/提示词收益多在 **16** 步前;**50** 步后差异很小 -- 原生分辨率下画面发软多为分辨率问题,而非步数 - -音频在联合去噪中比画面收敛慢。语音与音色建议 **12+** 步;**8** 步时音频常为弱项。 - -## 采样器与调度器 - -模板使用 **`res_multistep`** + **`simple`**。T2V/I2V/FastH3 在子图内;R2V、多帧、Fun ControlNet 在画布暴露 `KSamplerSelect` 与 `BasicScheduler`。 - -`res_multistep` 为二阶多步(首步为 Euler)。拆成两个采样器会丢失多步历史,第二段首步又变一阶。尽量单段采样,或给第二段足够步数预热。 - -默认 shift:**12**,`audio_shift`:**3**(模型定义)。FastH3 模板 **ModelSamplingMiniMaxH3** 为 `shift_video` **10**、`shift_audio` **3**。蒸馏构建上错误的 video shift(如 8 步用 **3** 而非 **10**)可能出现网格伪影。自定义微调见模型卡。[DMAD 4-step LoRA](https://huggingface.co/ZhengmingYu/DMAD/blob/main/minimax_h3/dmad_minimax_h3_4step_full_critic_comfyui.safetensors) 用 shift **12**、`audio_shift` **2**,采样器 **`lcm`** + **`simple`**。 - -## 使用 Sage Attention 加速生成 - -[Sage Attention](https://github.com/woct0rdho/SageAttention) 约可 **2×** 加速,画质影响通常较小(需自行安装): - -1. 从 [releases](https://github.com/woct0rdho/SageAttention/releases) 安装匹配 PyTorch/CUDA 的 wheel -2. 安装 [KJNodes](https://github.com/kijai/ComfyUI-KJNodes) 的 `Patch Sage Attention KJ` -3. 插在 `UNETLoader` 与 `BasicGuider` 之间,`sage_attention` 设为 `auto` -4. 或启动参数 `--use-sage-attention` - -部分 H3 层非 float16/bfloat16 会回退 PyTorch attention(控制台警告正常)。 - -### 使用 INT8 attention 时的画质下降 - -片段末尾形变或屏幕文字损坏,常见原因为 INT8 attention 量化。 - -- 模板为 **`int8_convrot`**。**Comfy Kitchen 不支持**([issue #15529](https://github.com/Comfy-Org/ComfyUI/issues/15529))。用默认 attention,或换 **`pruned_bf16`** 后再改后端。 -- **bf16** 上 **Comfy Kitchen attention**(量化前通道旋转)可消除伪影,速度相近。 - -在通向 `BasicGuider` 的模型链添加 **Model Attention Backend**(`comfy kitchen attention`),或 `--use-ck-attention`(0.32.0+)。需硬件支持 `comfy-kitchen` INT8 内核。 - -## 使用稀疏注意力加速生成 - -**Model Sparse Attention**(0.35.0+,实验性)降低长片段 attention 成本。基座 H3 用 **`sol-attn`**(`sla`/`vsa` 需匹配权重)。需 CUDA 与 `comfy-kitchen` 的 `sol_attn`,否则保持稠密。 - -- 默认 `start_percent` **0.2**、`end_percent` **1.0**。可约 **0.4** 起、**0.9** 止以保护首尾帧。 -- H3 保持 **`sink_conditioning`** 为 **`exact_kv_and_rows`**。 -- **`tau`** 越大越稀疏越快(`1.0` 约 16% 精确块,`1.3` 默认,`2.0` 约 2.7%)。 -- 短于 `min_tokens`(默认 **12288**)收益很小。 - -FastH3 用 **`vsa`**、`keep_percent` **10**;见 [FastH3 页面](/zh/tutorials/video/minimax/minimax-h3-fastvideo)。 - -### 稀疏注意力是否生效 - -基座 H3 模板不含此节点。在 `UNETLoader` 与 `BasicGuider` 之间加入 **Model Sparse Attention**,再打开 **`verbose`**(高级选项,默认关闭),每个 attention 形状会输出一行日志。 - -保持稠密的调用会输出 `dense ( tokens): ` 或 `dense (, , , ): `,只报告第一个不满足的条件: - -| 日志原因 | 处理方式 | -| --- | --- | -| `no compiled sol_attn kernel for this GPU` | 已安装的 `comfy-kitchen` 没有该 GPU 的 kernel。更新它,或在该机器上不使用此节点。 | -| ` tokens < min_tokens ` | 提高分辨率或片段长度,或调低 `min_tokens`(默认 **12288**)。 | -| `sigma outside the start/end window` | 放宽 `start_percent` 与 `end_percent`。 | -| `block in dense_blocks` | 从 `dense_blocks` 中移除该 block 序号。 | -| `no H3 layout for this call` | 仅 `vsa` 会出现。改用 `sol-attn`。 | - -成功的调用输出 `sparse (, , , ), sinks /` 或 `sparse producer path: tokens, `。 - -有三种情况即使打开 `verbose` 也不会输出日志:H3 路径上的激活值不是 bfloat16、`head_dim` 不是 **128**、缺少 rope 频率,都会静默退回稠密。 - -`vsa` 绑定在 FastH3 检查点上。它要读取只有该权重才有的 `to_gate_compress` 层提供的粗粒度分支,所以在其他 H3 检查点上节点会输出 `VSA: the model has no to_gate_compress layers; running the fine stage without the coarse branch`,只跑细粒度阶段。该警告不受 `verbose` 控制。 - ## 商业许可 -H3 的开放权重可免费下载和运行。对本地生成的输出进行商业使用,需要通过 Comfy(唯一官方经销商)购买 [MiniMax 商业许可](https://comfy.org/minimax/license)。Comfy Cloud 上的生成已包含商业使用权,因此许可仅在本地使用时需要。 - -需要购买吗? - -- **Comfy Cloud**:已包含商业使用权,无需购买。 -- **在美国、欧盟、英国和韩国之外的自有硬件上运行,且年收入低于 2,000 万美元**:MiniMax 免费的社区许可即可覆盖商业使用。请标注 "Powered by MiniMax H3";同样的地区规则也适用于产出的使用地。 -- **在美国、欧盟、英国或韩国的自有硬件上运行,或年收入超过 2,000 万美元**:需要以下两种许可之一。 - -许可分为两个档位: +本地生成内容的商业使用需通过 Comfy 购买许可。Comfy Cloud 上的生成已包含商业使用权。 -| | Professional | Enterprise | -| ------------------------- | ---------------------- | ------------------------------------------------------------ | -| 价格 | 每月 $5,000 起 | 定制,年度协议,按用量定价 | -| 期限 | 按月 | 最短 12 个月 | -| 授权用户 | 最多 10 人 | 不设上限 | -| 域名 | 1 | 可定制 | -| 模型版本 | 蒸馏版开放权重 | 全部版本,含非蒸馏权重及后续新版本 | -| 输出的商业使用 | 完整商业权利 | 完整商业权利 | -| 微调与 LoRA | 包含 | 包含 | -| 客户与下游工作 | 包含 | 包含 | - -Professional 每月 $5,000 起。Enterprise 不设固定标价,按生成量和团队规模报价。两个档位均在一份协议中覆盖 MiniMax H3 以及 MiniMax Audio & Music。[申请许可](https://comfy.org/contact) 以获取报价。 + + + 何时需要许可、社区许可与 Professional/Enterprise 档位,以及如何申请报价。 + +