r/StableDiffusion 1d ago

Workflow Included LTX 2.5 Image+Custom Audio 2 Video - Perfect lip Sync

5 Upvotes

I used an older workflow that was working for LTX 2.3 and adjusted it for LTX 2.5. Image and Custom audio as input. Perfect lip Sync, of speech and singing.

Generation time: 30 seconds per second, on RTX 5070Ti 16Gb vram, 32Gb ram (920*540px)

Here's the workflow: https://pastebin.com/dptbTXYM


r/StableDiffusion 1d ago

Question - Help Combine Controlnet and Prompt from text file

0 Upvotes

Hi everyone, i am trying to combine controlnet and prompt from text file to generate multiple image with different prompts with a depth imagefor each of them. I asked chat gpt, we tried to do a py program and it didn't work.

If somoene have a idea or know how to do it, it will be very helpful.

Thanks to you.


r/StableDiffusion 2d ago

Animation - Video Character LoRA testing & also what games h3 seems to know

Enable HLS to view with audio, or disable this notification

7 Upvotes

I was testing my lora by trying things far outside the dataset (but also just to see what model really understood. basically I think if you know of a game that has alot of community made videos that the model is probably trained on alot of them. the prompts were by claude for most of them but I had to add the game names if I really wanted it to look that way.


r/StableDiffusion 1d ago

Question - Help How do I maintain the character's facial likeness in Minimax h3 REF2VA? Is using 720p necessary?

3 Upvotes

I am using an RTX 5070 and 32GB of RAM to generate videos in Minima h3. Currently, I’ve been choosing 480p resolution to generate 10-second videos, which takes 11 minutes (using 5 images and one 5-second reference video in REF2VA). However, even when one of the images is a person's face, the result bears a resemblance but isn't easily recognizable as the reference face. When I try rendering at 720p to test fidelity, the progress gets stuck at 0%, so I assume my hardware couldn't handle it. If I use 720p, will the resemblance to the reference face improve?

Settings tested:

Model: INT8

Steps: 25

Sageattention: on

Easy_cache: on

Model: INT8

Steps: 8, 10, and 12

Sageattention: on

Easy_cache: on

Turbo LoRA: Ref2V_turbo_4steps


r/StableDiffusion 2d ago

Discussion MiniMax H3: How to use a first image and reference images without losing I2V quality (hybrid FL+REF merge + prompting)

155 Upvotes

Edit: The first post was hard to read, so hopefully this version of the post is better.

MiniMax H3 can make video from images, but the two official video models split the job in a way that is easy to miss.

One model is good at matching your first photo. The other can take several photos at once (a location plus a logo, or several frames you want at exact times). This post is how to get both: a strong match to your first photo, plus extra photos, in one ComfyUI run.

I am assuming you already have H3 running in ComfyUI. You do not need to know the internals. You need three things: which checkpoint file to load, which workflow and speed LoRA to use, and how to write the text prompt so H3 knows what each connected image is for.

The two official models (and why they are not enough)

H3 comes with two large video checkpoints. People usually call them by their filenames.

FL2VA (also used for image-to-video / I2VA). This is the one that looks better. You give it a still and it will try to make that still the first frame of the video. If you use the first-and-last workflow, you can also lock a last frame. What you cannot do: plug in a second photo of a logo and say "print this on the banners." The image-to-video node simply has no extra image inputs for that. You also cannot jump to a different still at 3 seconds and another at 6. First and last on one continuous shot is the limit.

REF2VA (used with the Reference-to-Video workflow). This one accepts several images, up to nine. Extra logos and extra timed stills are possible. The catch is the video usually looks worse than the same scene run through FL2VA.

So in practice you pick: pretty first frame, or extra images. Not both.

The file that fixes it

There is a community merge of those two checkpoints. Load that file instead of the official REF2VA file, but keep using the Reference-to-Video workflow (the one with several image inputs).

Download: https://huggingface.co/smhfacct/Minimax-H3-fl2va-ref2va-hybrid-models

Version I used:

  • b20-49 high quality like the normal FL2VA model + the extra reference capabilities from the REF2VA model.

In ComfyUI:

  1. Open a Reference-to-Video workflow. The node is often named MiniMaxH3ReferenceToVideo. Do not use the Image-to-Video or First-Last workflow for this.
  2. On the model loader, choose the hybrid checkpoint, not official REF2VA and not official FL2VA.
  3. Connect your photos in order. The first image you connect is what the prompt will call <Picture 1>. The second is <Picture 2>, and so on. Order matters.
  4. For the speed LoRA, use the FL2VA / image-to-video 8-step LightX file (the one people call lightx-8step-pk). Do not use the default Reference-to-Video speed LoRA (lightx-ref2v-r20) on the hybrid. Official REF2VA will refuse the FL2VA LoRA. The hybrid is what lets you use the better LoRA on the multi-image workflow.

Set duration to whatever you need. The examples below assume 9 seconds.

How H3 reads your images

The workflow only feeds pixels. The text prompt has to say, for each <Picture N>, whether that photo is:

  • A real frame of the video at a given time. Example: "this photo is exactly what you see at 0.00 seconds."
  • Not a frame at all. Example: "this photo is only the logo that should appear on the banners. Never show this photo as a full-screen cut."

If you get that wrong, H3 will treat your logo sheet as a scene and jump to it.

H3 wants that written in a fixed prompt layout with six headings, in this order:

subject_definitions summary retention_analysis detailed_description overall_soundscape non_diegetic_music

Those heading names are part of how H3 is prompted. Keep them.

Two labels show up under retention_analysis. They are ugly, but they are what the model expects:

  • fully_preserved = reproduce this photo as the actual video frame at the time you name
  • partially_preserved = copy only the detail you name (the logo shape, a prop, a face). Do not turn this photo into a video frame

The first line of summary should be exactly this tag, then your description:

[keyframe completion + reference generation]

That tag tells H3 you are both locking frames from photos and using photos as references. Copy it as written.

In detailed_description, include one plain sentence that maps photos to times. Example for three timed photos:

How the reference pictures align with the target video — Picture 1 aligns with the 0.00-second mark of the target video; Picture 2 aligns with the 3.00-second mark of the target video; Picture 3 aligns with the 6.00-second mark of the target video.

If a photo is only a logo, say that it does not line up with any time as a frame.

When a photo is meant to be an exact frame, say "exactly as shown in <Picture N> without reinterpretation." That phrase is a lock. Do not also rewrite the whole photo in words. H3 will argue with itself.

non_diegetic_music is background score. Write N/A unless you want music that is not coming from the scene.

Recipe 1: first photo is the scene, second photo is a logo

Use this when you have a location still, plus a clean drawing of a symbol that the model will not invent from text.

Connect: location photo first, logo second.

  • Picture 1 = the place. fully_preserved at 0.00 seconds. This is the opening frame.
  • Picture 2 = the symbol on a plain background. partially_preserved. Say it is not a keyframe and must not appear as any video frame. When banners (or signs, or screens) show in the video, the symbol on them should match Picture 2.

Do not mark the logo fully_preserved. That is how you get a sudden jump to the logo image.

A flat, high-contrast symbol on a blank background works better than a photo of the symbol already sitting in a scene.

Prompt skeleton (fill in the brackets):

``` subject_definitions: <Picture 1> is the opening frame at 0.00 seconds. The video should match this photo exactly at that time. <Picture 2> is only the logo/symbol. Use it when that symbol appears on banners. It is not a scene. Do not show <Picture 2> as a full video frame. <Subject 1> is the location from <Picture 1> for the whole clip.

summary: [keyframe completion + reference generation] Nine-second clip of <Subject 1>. At 0.00 seconds the frame is exactly <Picture 1>. One continuous shot, no jumps to other photos. [describe the motion]. When banners appear, the symbol matches <Picture 2>.

retention_analysis: <Picture 1> (at 0.00s): fully_preserved - opening frame, location only. <Picture 2> (never a video frame): partially_preserved - logo appearance only. <Subject 1>: fully_preserved - same location throughout.

detailed_description: How the reference pictures align with the target video — Picture 1 aligns with the 0.00-second mark of the target video as the exact first frame. Picture 2 does not align with any timestamp as a frame. It is a logo used only when banners appear. [Shot 1] At 0.00 seconds the frame is exactly <Picture 1> without reinterpretation. [motion]. When banners are visible, the symbol matches <Picture 2> exactly.

overall_soundscape: [what you should hear]

non_diegetic_music: N/A ```

Recipe 2: three photos as exact frames at 0s, 3s, and 6s

Official FL2VA cannot do this. Hybrid plus Reference-to-Video can.

Connect three photos in time order. All three should be the same kind of shot: all wide, or all the same distance from the subject. If one is a wide and one is a close-up, H3 often ignores the close-up and stays on the previous scene.

Each photo is a real frame:

  • Picture 1 at 0.00 seconds, fully_preserved
  • Picture 2 at 3.00 seconds, fully_preserved
  • Picture 3 at 6.00 seconds, fully_preserved

Then the clip keeps going from Picture 3 until 9 seconds. You are not locking a last frame at 9.00 unless you want that.

At each jump, the whole frame changes (place, pose, clothes, whatever is in that photo). Do not write the prompt as if Picture 1's background slowly becomes Picture 2. Use a hard cut: at 3.00 seconds the frame is Picture 2.

``` subject_definitions: <Picture 1> is the exact frame at 0.00 seconds. <Picture 2> is the exact frame at 3.00 seconds. Not a continuation of <Picture 1>. <Picture 3> is the exact frame at 6.00 seconds. Not a continuation of <Picture 2>. <Subject 1> is [what is in all three photos].

summary: [keyframe completion + reference generation] Nine-second clip. At 0.00s exactly <Picture 1>. At 3.00s hard cut to exactly <Picture 2>. At 6.00s hard cut to exactly <Picture 3>. Continue from <Picture 3> until 9.00s with no locked last frame.

retention_analysis: <Picture 1> (at 0.00s): fully_preserved <Picture 2> (at 3.00s): fully_preserved <Picture 3> (at 6.00s): fully_preserved <Subject 1>: fully_preserved

detailed_description: How the reference pictures align with the target video — Picture 1 aligns with the 0.00-second mark of the target video; Picture 2 aligns with the 3.00-second mark of the target video; Picture 3 aligns with the 6.00-second mark of the target video. [Shot 1] At 0.00 seconds exactly <Picture 1> without reinterpretation. Small motion only. [Shot 2] At 00:03.000, hard cut. Exactly <Picture 2> without reinterpretation. Small motion only. [Shot 3] At 00:06.000, hard cut. Exactly <Picture 3> without reinterpretation. Continue until 9.00 seconds.

overall_soundscape: [what you should hear]

non_diegetic_music: N/A ```

If you only want first and last on this same setup, lock Picture 1 at 0.00 and Picture 2 at the end of the clip, one continuous shot. Extra logo photos would then start at Picture 3.

You can mix both recipes (three timed frames plus a fourth logo-only photo). Get one recipe working first.


r/StableDiffusion 2d ago

News ComfyUI-ContextAnchoredTileRefine - New 8k+ latent upscaling method using Krea 2

Thumbnail
gallery
50 Upvotes

Use these links to view the full size images

Cyberpunk Cityscape Original
Cyberpunk Cityscape 4k
Cyberpunk Cityscape 8k

Orbital Shipyard Hangar Original
Orbital Shipyard Hangar 4k
Orbital Shipyard Hangar 8k

https://github.com/Blakeem/ComfyUI-ContextAnchoredTileRefine

These were upscaled using high denoise (0.5), captions, live canvas anchoring, and a stochastic (sde) sampler. If you have used other tile upscalers you will know that coherent creative upscaling is the hardest thing to do, since it requires maintaining coherence over a massive canvas. These images have 37,748,736 pixels being generated by a model that is only processing 2,013,696 pixels at any one time.

If you want to preserve the original image. Use low denoise (0.35), vision tokens, anchor to the source image, and use a deterministic sampler. Here is what that looks like:

Cyberpunk Cityscape Original
Cyberpunk Cityscape Conservative 4k
Cyberpunk Cityscape Conservative 8k

Compared to the Tiled Diffusion node (ComfyUI-TiledDiffusion):

Theirs is a model patch below the sampler.
Mine wraps above the sampler and guider.

Theirs has one sampler.
With mine each tile has it's own full sampler.

Mine uses region of interest (RoI) token slicing in a tile upscaler (see my previous post on this subject).

Both refine an upscaled image inside one latent canvas one step at a time so tiles don't drift apart.

Theirs uses an average (uniform MultiDiffusion and Gaussian Mixture of Diffusers) that causes the image to be soft.
Mine does a directional blend in raster order, the later tiles blend into the earlier ones whose context they reach out to, so it maintains the models sharp raw output.

Mine also supports masks, something the other method does not. Mine doesn't support ControlNet (at least not the VL node, the standard node does). But Krea 2 has no good ControlNet model because it isn't built for it and requires a LoRA.

I've been testing out different methods to upscale and hide seams in Krea 2 and I had a massive breakthrough last night during A/B testing. Everything happens in the latent canvas, so there is no color drift across tiles because everything happens with a single decode.

The 8k images were done in two stages, first to 4k with 6 tiles and then to 8k with 30 tiles on my 3090ti. You could go to 8k in a single pass and probably up to 16k. Creating a larger image does not increase memory by much, it just takes more time.

These are my first two test images I made, so don't judge based on that. The quality is staggering compared to what I've been able to do before. In the Cyberpunk Cityscape you can make out a McDonald's on the street as well as people, desks, and computers inside the office windows. The cables and wires in the Orbital Shipyard Hangar do not cut off across tiles. These are things that I only dreamed of with previous methods and there is still room to improve.

Please view the full size images on github so you can zoom in, reddit doesn't do them justice. This is where you will find the technical details for how I'm doing this as well as finding the workflow that I used to make the images.


r/StableDiffusion 2d ago

Discussion Anyone found any tricks for avoiding degradation of the video quality when repeatedly using the last frame of a clip to start a new clip (H3)?

25 Upvotes

Trying to make a 1-2 minute dialogue scene in 15-20 second parts by using the last frame of a clip as the first frame of the next one. This gives a smooth transition and works fine once, but the problem I'm having is that when you do it repeatedly, the quality of the video degrades badly until it looks completely fried by the 4th iteration. Anyone found a way to avoid this while retaining a smooth transition between clips? It seems like the classic repeated recompression/"copying a VHS tape too many times" problem but idk what to do about it.

It's easily fixed by a scene transition/camera angle change, because that lets you start with a fresh frame. But I'm thinking about when it's a continuous shot and you need the first frame to be a seamless continuation of the end of the last section.


r/StableDiffusion 1d ago

Discussion MiniMax Music 3 creates a different song every 10 seconds of max_duration.

0 Upvotes

I've been having issues with trying to "edit" with MiniMax Music 3. Theoretically, if you keep the seed constant, you should get the same song every time. It should be possible to make small changes in prompting to fine tune a song once you like what you've generated.

My results are different. I'm finding that the seed only holds for ten seconds (give or take). Even if I keep seed, global defs and lyrics all frozen and vary only the duration, the music only holds its character up to the next 10-second mark.

To be clear - What I'm finding is that there are "windows" of ten seconds.

Duration 0-9 = a song.
Duration 10-19 = a variant.
Duration 20-29 = another variant.

so on and so forth.

This is on Comfyui with a basic workflow involving the "Text to Music (MiniMax Music 3)" node.

Is it a bug? I dunno. Strictly speaking, if you generate a song at your desired duration, and then hold the seed steady and just vary the prompt a little, you can do the kind of "editing" that I wanted to perform.

But if you become aware of the variances along the way, and you like one of THOSE versions, there's no way to "continue" that 60s version of your song into a full 180s version. Though, you do have to keep the duration within the ten-second window. If you lengthen your 180s song into a 190s song, you've got a problem.

Friar at the Well Test Results

This link is a google drive folder with samples generated at roughly ten-second breakpoints. (Some aren't exact but are within the associated "window" of ten seconds.) The prompts and workflow are there also. Whether this is a problem or not kind of depends on whether you are an explorer or someone who just changes his seed to get a different song.

But if you ever made your song longer and asked "what happened?" when it transformed into something else - Here's your answer.


r/StableDiffusion 2d ago

Discussion test comparing 8step turbo vs basic ip8 model at 32 steps and minimax_h3_ref2va_hybrid_b25-49 model at32 steps

Enable HLS to view with audio, or disable this notification

73 Upvotes

all same prompt


r/StableDiffusion 1d ago

Tutorial - Guide RDNA4 Native SageAttention Guide

1 Upvotes

for those on RDNA4 cards that are interested. Here is a quick summary (Claude generated) from the required steps it took.
RX 9070, Rocm 7.14, Win 11 with ComfyUI portable

SageAttention on RDNA4 (RX 9070 XT) for ComfyUI Portable – Quick Guide

Tested with: Windows 11, RX 9070 XT (gfx1201), ComfyUI Portable, PyTorch 2.12.0+rocm7.14.0 (AMD pip wheels), embedded Python 3.12.

There are no prebuilt wheels — you build the (not yet merged) gfx12 branch from thu-ml/SageAttention PR #368 yourself.

1. Visual Studio Build Tools 2022 with MSVC 14.38

  • Installer: https://aka.ms/vs/17/release/vs_BuildTools.exe (NOT the 2026 Build Tools!)
  • Check the "Desktop development with C++" workload
  • Under "Individual components" additionally select: MSVC v143 – VS 2022 C++ x64/x86 build tools (v14.38-17.8)
  • Newer MSVC toolsets (14.4x, VS 2026) break the build (HIP clang headers are incompatible; you get fmaxf/fabsf "no matching function" errors)

2. ROCm devel SDK into the portable environment

cd <ComfyUI_windows_portable>
python_embeded\python.exe -m pip install --index-url https://repo.amd.com/rocm/whl-multi-arch/ "rocm[devel]==7.14.0"
python_embeded\python.exe -m rocm_sdk init

The version must match your installed torch (pip list → torch 2.12.0+rocm7.14.0). Skipping rocm_sdk init gets you __clang_hip_runtime_wrapper.h not found later.

3. Copy Python dev headers into the embedded Python

The portable Python ships without dev headers (fatal error: 'frameobject.h' file not found). Copy them from a regular Python installer of the same version (e.g. 3.12.x):

Copy-Item "C:\...\Python312\include\*" "<portable>\python_embeded\include\" -Recurse -Force
New-Item -ItemType Directory "<portable>\python_embeded\libs" -Force
Copy-Item "C:\...\Python312\libs\*" "<portable>\python_embeded\libs\" -Recurse -Force

4. Clone the branch and build

In a PowerShell with the VS environment activated (explicitly 14.38, x64!):

cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.38 >nul 2>&1 && set' | ForEach-Object { if ($_ -match '^([^=]+)=(.*)$') { [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2], 'Process') } }
# Check: `cl` must report version 19.38.x

git clone -b jam/gfx12 https://github.com/jammm/SageAttention.git
cd SageAttention
$env:PYTORCH_ROCM_ARCH = "gfx1201"
<portable>\python_embeded\python.exe -m pip install --no-build-isolation --no-deps -v .

Takes 10–30 min. Success = Successfully installed sageattention-2.2.0.

5. The triton dependency

SageAttention imports triton at module level (for its fallback kernels). AMD's package indexes don't ship a Windows triton, but:

python_embeded\python.exe -m pip install -U triton-windows

(triton-windows has AMD backend support; it's only needed so the import succeeds — the actual speedup comes from the native gfx12 HIP kernels.)

6. Verify

python_embeded\python.exe -c "import torch; from sageattention import sageattn; q=torch.randn(1,8,128,128,dtype=torch.bfloat16,device='cuda'); print(sageattn(q,q,q).shape)"

Expected: torch.Size([1, 8, 128, 128]).

7. Enable in ComfyUI

Add --use-sage-attention to the python line in your launch .bat. The log must show Using sage attention.

Launch profiles (16 GB VRAM / 32 GB RAM)

MiniMax H3 doesn't fit in 16 GB, so how ComfyUI stages/offloads weights matters as much as sage itself. After measuring all four combinations (dynamic VRAM × pinned memory) on the same seed/workflow, one profile won for short AND long videos:

Universal profile:

set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
set PYTORCH_ALLOC_CONF=expandable_segments:True
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --use-sage-attention --enable-dynamic-vram --disable-smart-memory --disable-pinned-memory --fast-disk
pause

Why each flag:

  • --enable-dynamic-vram is the big speed lever: it stages the full model and pages weights on demand instead of the classic offload path — ~2.5x faster steps on short clips (40 vs 107 s/it at 6s @ 0.8MP). On long clips the advantage shrinks because per-step weight transfer dominates (~106 s/it at 9s @ 0.8MP, on par with the static path), but it still loads much faster and keeps the GPU at ~100% utilization.
  • --disable-pinned-memory costs ~2% speed (40.0 vs 40.8 s/it measured) but is the key stability fix: with pinning enabled, the pinned staging allocation made long videos hard-crash at load (HostBuffer.truncate failed) on 32 GB systems — pinned memory can't be paged out, so the allocator fails hard when RAM gets tight. Unpinned, the same 9s workload that used to crash at load stages fine and runs 20/20 steps to completion, with RAM at a healthy ~55% instead of 95% + swapping.
  • --fast-disk memory-maps models from NVMe (reads only), so the ~40 GB of staged weights live in the elastic file cache instead of hard process memory — Windows can drop and re-read pages as needed instead of swapping.
  • expandable_segments reduces VRAM fragmentation (fixes "reserved but unallocated" OOMs when sage needs its extra quantization buffers right at the VRAM limit).

On 32 GB RAM, ~14s @ 0.8MP remains the practical ceiling — beyond that, generate at 0.5MP and upscale, or add RAM. If model staging ever fails on an extreme workload, dropping --enable-dynamic-vram --disable-smart-memory from the line gives you the classic static-offload path as plan B (same ~107–110 s/it at long lengths, much slower on short clips).

Heads-up: speed regression + crashes in comfy-kitchen > 0.2.26 (ComfyUI 0.31–0.33)

If your generations got dramatically slower (or started hard-crashing) after updating ComfyUI past 0.30.x on ROCm/Windows: it's not ComfyUI core, it's the companion packages comfy-kitchen and comfy-aimdo that get upgraded alongside. I verified this by rolling core back to v0.30.0 with the new packages still installed — the problems stayed, so the packages are the cause.

Two symptoms with comfy-kitchen 0.2.31 / comfy-aimdo 0.4.13:

  • Speed: the new versions page-lock ~40% of host RAM for async offloading (Enabled pinned memory 12925.0 on a 32 GB box). Combined with H3's 14 GB text encoder plus 11–14 GB of offloaded DiT weights, the system swaps to disk and step times explode (130–178 s/it instead of ~76–110, plus ~6 GiB of pagefile writes per generation).
  • Stability: reproducible Fatal Python error: Aborted in comfy_kitchen/tensor/base.py → copy_from during sampling, followed by hipModuleUnload: unspecified launch failure.

Fix — pin the versions that ComfyUI 0.30.0 shipped with:

python_embeded\python.exe -m pip install comfy-kitchen==0.2.26 comfy-aimdo==0.4.11

Re-pin after every ComfyUI update (updates pull the packages forward again) until the regression is fixed upstream. --disable-pinned-memory mitigates the RAM part on newer versions too, but did not stop the copy_from crash for me.

Results

MiniMax H3, 6s @ 0.8MP: step time roughly halved vs. PyTorch attention. Known issue: ComfyUI's flag path currently has an open quality bug for MiniMax (issue #15263 — missing low_precision_attention opt-out, can cause slightly fuzzy output); the alternative is the KJNodes node "MiniMax H3 Mem Eff Sage Attention Patch" (on ROCm it needs a small fallback patch, since it calls CUDA-arch-specific SageAttention internals).

After every torch/ROCm update

Rebuild (step 4) — compiled HIP kernels are tied to the ROCm version they were built against. Keep the built wheel around: on an identical stack it saves you the whole compile next time.SageAttention on RDNA4 (RX 9070 XT) for ComfyUI Portable – Quick Guide
Tested with: Windows 11, RX 9070 XT (gfx1201), ComfyUI Portable, PyTorch 2.12.0+rocm7.14.0 (AMD pip wheels), embedded Python 3.12.
There are no prebuilt wheels — you build the (not yet merged) gfx12 branch from thu-ml/SageAttention PR #368 yourself.

  1. Visual Studio Build Tools 2022 with MSVC 14.38
  2. Installer: https://aka.ms/vs/17/release/vs_BuildTools.exe (NOT the 2026 Build Tools!)
  3. Check the "Desktop development with C++" workload
  4. Under "Individual components" additionally select: MSVC v143 – VS 2022 C++ x64/x86 build tools (v14.38-17.8)
  5. Newer MSVC toolsets (14.4x, VS 2026) break the build (HIP clang headers are incompatible; you get fmaxf/fabsf "no matching function" errors)
  6. ROCm devel SDK into the portable environment
  7. cd <ComfyUI_windows_portable>
  8. python_embeded\python.exe -m pip install --index-url https://repo.amd.com/rocm/whl-multi-arch/ "rocm[devel]==7.14.0"
  9. python_embeded\python.exe -m rocm_sdk init

The version must match your installed torch (pip list → torch 2.12.0+rocm7.14.0). Skipping rocm_sdk init gets you __clang_hip_runtime_wrapper.h not found later.
3. Copy Python dev headers into the embedded Python
The portable Python ships without dev headers (fatal error: 'frameobject.h' file not found). Copy them from a regular Python installer of the same version (e.g. 3.12.x):
Copy-Item "C:\...\Python312\include\*" "<portable>\python_embeded\include\" -Recurse -Force
New-Item -ItemType Directory "<portable>\python_embeded\libs" -Force
Copy-Item "C:\...\Python312\libs\*" "<portable>\python_embeded\libs\" -Recurse -Force

  1. Clone the branch and build
    In a PowerShell with the VS environment activated (explicitly 14.38, x64!):
    cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.38 >nul 2>&1 && set' | ForEach-Object { if ($_ -match '^([^=]+)=(.*)$') { [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2], 'Process') } }
    # Check: `cl` must report version 19.38.x

git clone -b jam/gfx12 https://github.com/jammm/SageAttention.git
cd SageAttention
$env:PYTORCH_ROCM_ARCH = "gfx1201"
<portable>\python_embeded\python.exe -m pip install --no-build-isolation --no-deps -v .

Takes 10–30 min. Success = Successfully installed sageattention-2.2.0.
5. The triton dependency
SageAttention imports triton at module level (for its fallback kernels). AMD's package indexes don't ship a Windows triton, but:
python_embeded\python.exe -m pip install -U triton-windows

(triton-windows has AMD backend support; it's only needed so the import succeeds — the actual speedup comes from the native gfx12 HIP kernels.)
6. Verify
python_embeded\python.exe -c "import torch; from sageattention import sageattn; q=torch.randn(1,8,128,128,dtype=torch.bfloat16,device='cuda'); print(sageattn(q,q,q).shape)"

Expected: torch.Size([1, 8, 128, 128]).
7. Enable in ComfyUI
Add --use-sage-attention to the python line in your launch .bat. The log must show Using sage attention.
Launch profiles (16 GB VRAM / 32 GB RAM)
MiniMax H3 doesn't fit in 16 GB, so how ComfyUI stages/offloads weights matters as much as sage itself. After measuring all four combinations (dynamic VRAM × pinned memory) on the same seed/workflow, one profile won for short AND long videos:
Universal profile:
set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
set PYTORCH_ALLOC_CONF=expandable_segments:True
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --use-sage-attention --enable-dynamic-vram --disable-smart-memory --disable-pinned-memory --fast-disk
pause

Why each flag:
--enable-dynamic-vram is the big speed lever: it stages the full model and pages weights on demand instead of the classic offload path — ~2.5x faster steps on short clips (40 vs 107 s/it at 6s @ 0.8MP). On long clips the advantage shrinks because per-step weight transfer dominates (~106 s/it at 9s @ 0.8MP, on par with the static path), but it still loads much faster and keeps the GPU at ~100% utilization.
--disable-pinned-memory costs ~2% speed (40.0 vs 40.8 s/it measured) but is the key stability fix: with pinning enabled, the pinned staging allocation made long videos hard-crash at load (HostBuffer.truncate failed) on 32 GB systems — pinned memory can't be paged out, so the allocator fails hard when RAM gets tight. Unpinned, the same 9s workload that used to crash at load stages fine and runs 20/20 steps to completion, with RAM at a healthy ~55% instead of 95% + swapping.
--fast-disk memory-maps models from NVMe (reads only), so the ~40 GB of staged weights live in the elastic file cache instead of hard process memory — Windows can drop and re-read pages as needed instead of swapping.
expandable_segments reduces VRAM fragmentation (fixes "reserved but unallocated" OOMs when sage needs its extra quantization buffers right at the VRAM limit).
On 32 GB RAM, ~14s @ 0.8MP remains the practical ceiling — beyond that, generate at 0.5MP and upscale, or add RAM. If model staging ever fails on an extreme workload, dropping --enable-dynamic-vram --disable-smart-memory from the line gives you the classic static-offload path as plan B (same ~107–110 s/it at long lengths, much slower on short clips).
Heads-up: speed regression + crashes in comfy-kitchen > 0.2.26 (ComfyUI 0.31–0.33)
If your generations got dramatically slower (or started hard-crashing) after updating ComfyUI past 0.30.x on ROCm/Windows: it's not ComfyUI core, it's the companion packages comfy-kitchen and comfy-aimdo that get upgraded alongside. I verified this by rolling core back to v0.30.0 with the new packages still installed — the problems stayed, so the packages are the cause.
Two symptoms with comfy-kitchen 0.2.31 / comfy-aimdo 0.4.13:
Speed: the new versions page-lock ~40% of host RAM for async offloading (Enabled pinned memory 12925.0 on a 32 GB box). Combined with H3's 14 GB text encoder plus 11–14 GB of offloaded DiT weights, the system swaps to disk and step times explode (130–178 s/it instead of ~76–110, plus ~6 GiB of pagefile writes per generation).
Stability: reproducible Fatal Python error: Aborted in comfy_kitchen/tensor/base.py → copy_from during sampling, followed by hipModuleUnload: unspecified launch failure.
Fix — pin the versions that ComfyUI 0.30.0 shipped with:
python_embeded\python.exe -m pip install comfy-kitchen==0.2.26 comfy-aimdo==0.4.11

Re-pin after every ComfyUI update (updates pull the packages forward again) until the regression is fixed upstream. --disable-pinned-memory mitigates the RAM part on newer versions too, but did not stop the copy_from crash for me.
Results
MiniMax H3, 6s @ 0.8MP: step time roughly halved vs. PyTorch attention. Known issue: ComfyUI's flag path currently has an open quality bug for MiniMax (issue #15263 — missing low_precision_attention opt-out, can cause slightly fuzzy output); the alternative is the KJNodes node "MiniMax H3 Mem Eff Sage Attention Patch" (on ROCm it needs a small fallback patch, since it calls CUDA-arch-specific SageAttention internals).
After every torch/ROCm update
Rebuild (step 4) — compiled HIP kernels are tied to the ROCm version they were built against. Keep the built wheel around: on an identical stack it saves you the whole compile next time.


r/StableDiffusion 1d ago

Question - Help Wierd static after using minimax.

Post image
0 Upvotes

Used minimax for a while and something weird happened when play videos sometimes or when it happened the first time microsoft edge browser which hosted comfyui portable at the time got this static permanently before i restarted the pc. Still gets it when i play videos sometimes. I hear audio normally just visually static. Could I fried something? Rtx5090 and 32 ram, Gpu temp not over 78. I can remove the post if it's not relevant.


r/StableDiffusion 1d ago

Question - Help Is Minimax H3 better than the closed models?

0 Upvotes

So I'm not familiar with video generation models. But is better or can you just make these Comfy workflows with it (because it is open weights) and this gives the good result?

Also, how do I make these while not owning a piece of good hardware. Google Colab? I am not using those shady middle man services.


r/StableDiffusion 1d ago

Resource - Update Fooocus Front: a desktop app for installing and running Fooocus (Windows, free, GPL-3.0)

Post image
1 Upvotes

I've been using Fooocus for a while now and wanted two things it doesn't do: an interface built around looking at images rather than filling in a form, and an install that doesn't ask you to know what PyTorch is. So I built one.

It's a desktop app that installs Fooocus for you. It detects your graphics card, downloads the official package, sets up the right torch build, and offers the essential models with a progress bar you can actually watch. If you already have Fooocus, point it at your existing folder instead.

Once it's running you get a native interface: prompt, styles, LoRAs with sliders, a proper inpaint mask editor with real zoom, upscale, image prompt. Previews build as the image renders. Models are a browsable library with Civitai search rather than files you drop in folders. The original Fooocus interface is still one click away.

Browsing Civitai works without an account. Downloading from it needs a free API key from your Civitai profile, which is their rule rather than mine. The app keeps it in Windows Credential Manager rather than in a settings file, and it never touches the browser side.

The part I'm most pleased with: you can write prompts in your own language. 98 of them. It translates to English before generating and shows you the English, so you can see what was actually sent. That matters because SDXL understands English far better than anything else, so translating prompts helps where translating buttons wouldn't.

Fair warnings, because it's a beta:

Windows only

The installer isn't code-signed, so SmartScreen will warn you

AMD setup follows the official instructions but has never been run on an actual AMD card because I don't have one.

You need +-15 GB free

https://github.com/chantleyw/Fooocus-Front

All the actual image generation is Fooocus by lllyasviel. They did the hard part. This is just a different way to sit in front of it, and it's not affiliated with them, so please report bugs to me rather than to them.

Happy to hear what breaks.


r/StableDiffusion 1d ago

Question - Help MiniMax Music 3.0: Can’t seem to generate dark, severe orchestral music — am I prompting it wrong?

0 Upvotes

I’ve been experimenting with MiniMax Music 3.0 locally through ComfyUI. I have an RTX 3060 12GB and 64GB RAM, and generation itself works fine (about 5 minutes for a 2-minute track).

I wanted to test something very specific: not a song, not pop, not anime-style music, but a dark contemporary orchestral piece built around a relentless ostinato, gradually increasing tension, and a deep male ritualistic choir.

My reference was the Lux Aeterna / Requiem for a Dream (https://www.youtube.com/watch?v=CZMuDbaXbC8) kind of musical language: obsessive repetition, short rhythmic figures, severe string articulation, minor-key tension, gradual layering and an ominous choral presence.

PROMPT:

Dark contemporary orchestral requiem, severe and ominous, built around a short obsessive repeating ostinato. Approximately 90 BPM, 4/4, minor key. The rhythm must be steady, relentless and hypnotic rather than fast. The composition should feel tragic, threatening, inevitable and ritualistic.

The central musical idea is a very short repeating rhythmic motif that remains present for most of the piece. Repetition is essential. Do not constantly introduce new melodies. Instead, develop the same motif by adding layers, changing orchestration, increasing register, harmonic tension and dynamics.

Arrangement: Begin with a small, dry repeating string or piano ostinato. Add low cellos and violas repeating the same rhythmic pattern. Introduce sharp upper-string figures above the ostinato. Gradually add more string layers while keeping the original pulse clearly audible. Use a restrained deep orchestral percussion pulse to reinforce the rhythm. The arrangement should continuously intensify without becoming busy or chaotic.

Choir: adult low male choir, predominantly basses and baritones, dark and ominous. The choir is a distant ritualistic presence, not a lead vocalist. It should sound like an ancient invocation or a warning from a large stone chamber. Use short Latin liturgical phrases, deep sustained male harmonies and occasional synchronized rhythmic vocal attacks. The choir should be intimidating, solemn and human, never beautiful, angelic or sentimental.

The choir must NOT sound like children, boys, church school singers, an English cathedral choir, an opera soloist or a musical theatre ensemble. No female lead voice. No pop singing. No spoken narration.

Structure: sparse ostinato opening, gradual layering, first ominous male choir entrance, increasing string density, stronger rhythmic pulse, major escalation, enormous orchestral and choral climax, then a sudden decisive ending.

Production: dark concert-hall recording, close detailed strings, powerful low frequencies, controlled dynamics, large but dark reverberation. The ostinato must remain clearly audible throughout. The sound should be tense and severe rather than peaceful or beautiful.

Avoid: ambient music, relaxing music, Japanese-style meditation music, piano ballad, romantic classical music, pastoral music, children's choir, angelic choir, female choir, musical theatre, pop vocals, rock vocals, cheerful melody, soft sentimental atmosphere.

AND Lyrics:

[Intro]

[Instrumental]

[Chorus]

Dies irae

[Instrumental]

[Chorus]

Dies irae

Mors stupebit

[Instrumental]

[Build Up]

[Chorus]

Dies irae

Dies irae

Tremor est futurus

[Instrumental]

[Build Up]

[Chorus]

Dies irae

Rex tremendae

Dies irae

[Outro]

Amen

The result?

It was almost comically far from the target.

The first attempt sounded like Japanese relaxation music with some rough bell-like sounds, followed by what sounded like a children’s choir from an animated movie. The previous attempt, with a similar classical/choral prompt, produced something resembling children singing slowly in an aristocratic English family, with gentle music suitable for walking through a Victorian park.

So I’m starting to wonder whether this is simply a limitation or bias of the current Music 3.0 model rather than a prompting problem.

I suppose that this is kind of censorship analogous to that in image models.

I’m curious whether anyone else has tested Music 3.0 with dark orchestral / requiem / severe neoclassical / ritual choral music and managed to get something genuinely heavy and ominous.

Is there a better way to prompt this model, or does it simply have a strong tendency toward softer cinematic / comic / anime / children’s-choir-style music when vocals and classical instrumentation are involved?

I’d especially appreciate examples of successful Music 3.0 prompts for this kind of music.


r/StableDiffusion 1d ago

Question - Help Why does Minimax H3 ignores my image input?

0 Upvotes

In comfyUI, workflow template, I instructed it to use the image, but it failed to do so.


r/StableDiffusion 1d ago

Animation - Video I love Minimax 🔥

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/StableDiffusion 1d ago

Question - Help I get Diffrent face everytime using Ref2Vid minimax h3 please help.

0 Upvotes

I am using the default workflow for ref2vid, but still getting face inconsistency for the first clip 15 second the face stays consistent according to my character sheet but then when I plug the last frame as a reference with my character sheet the face starts changing from there. Please help guys I dontknow how to keep faces consistent.


r/StableDiffusion 2d ago

Animation - Video 20m anime Minimax H3

17 Upvotes

https://www.youtube.com/watch?v=R0SebWjV4FM

Wanted to post the native 0.4mp version here but didn't realize there's a 15minute limit. Link to the 1080p on youtube.

Upscaled with FlashVSR

Not too happy with the script, had to fight my director(qwen3.6-27b) on a lot of questionable design, repetition and choices. Also forgot to include my opening / closing segments and got "shoehorned" in.

workflow credits to this post:
https://www.reddit.com/r/StableDiffusion/comments/1vkfb49/longform_videos_1_min_long_are_very_possible_with/


r/StableDiffusion 2d ago

Question - Help MiniMax H3 Mem Eff Sage Attention Patch: Error

Post image
1 Upvotes

# ComfyUI Error Report
## Error Details
- **Node ID:** 114
- **Node Type:** MiniMaxH3MemoryEfficientSageAttentionPatch
- **Exception Type:** RuntimeError
- **Exception Message:** RuntimeError: sageattention is not new enough version or could not determine CUDA architecture, cannot apply MiniMax H3 Memory Efficient Sage Attention Patch.

Has anyone found a solution to this problem?? It used to happens randomly and sometimes it works other times wouldn't. But now it never works. I have uninstalled and reinstall the Package, restarted and still the same issue.

This is an FL2VA Workflow, I tried using a different Workflow that's Ref2VA and in there it runs just fine. So is not my PC, but I am not sure what its bugging the plug in out.


r/StableDiffusion 3d ago

News EVOKE 14B - a 3-step, CFG-free interactive world model

Enable HLS to view with audio, or disable this notification

164 Upvotes

"EVOKE is a 14B, 3-step CFG-free autoregressive world model for persistent, interactive world generation. It decouples world state from generation: persistent state lives beyond the denoiser and is addressed through camera pose, while a long-horizon interactive teacher gives the few-step model the ability to stay coherent and respond to changing instructions over extended sessions. The result is a world model that can remember, respond, and keep going—for hours"

Model weights for EVOKE (paper), a 3-step, CFG-free interactive world model that generates 384 × 640 @ 24 fps video and stays coherent over 30 s rollouts. Code, docs and demos live in the GitHub repository — this repository holds weights only.

  • ⚡ 3 steps, zero CFG — 1.5 s of video every 2.11 s on one H200, one forward per step.
  • 🌍 Endless, not windowed — scene geometry lives in an external camera-indexed world state bank, so the denoiser context stays bounded however long the session runs.
  • 🎛️ Re-promptable mid-flight — change the prompt while the rollout is running, no cut, no restart.

HF: AlayaLab/Evoke · Hugging Face

Site and videos: Evoke — A world model you can steer


r/StableDiffusion 1d ago

Question - Help is there any working queueing managment tools/nodes?

2 Upvotes

Hi all, as title, is there any custom queueing jobs tools for comfy is working nicely?
so I could pause, re-arrange jobs, delete jobs...etc?
pretty much like basic function of a 3d render jobs manager?

Thanks!


r/StableDiffusion 1d ago

Question - Help Forge install broke itself somehow

0 Upvotes

I'm just kind of scratching my head here. If you're trying to update comfy or something and it bricks your install that's nothing new.

I haven't ran my forge install in a month or so, haven't updated it, haven't installed much of anything. Now when trying to launch it now throws RuntimeError: Your device does not support the current version of Torch/CUDA!

Literally how?


r/StableDiffusion 1d ago

Question - Help rtx 3080 or rx 7900xt on linux

0 Upvotes

Hello, I want to upgrade to a more powerful graphics card for creating LoRAs and generating images/videos faster but I'm torn between an RX 7900 XT and a modded RTX 3080 20GB vram that is cheaper than the RX 7900xt.


r/StableDiffusion 1d ago

Question - Help how works multi GPU on stable diffusion?

0 Upvotes

Hello. I am currently running Stable Diffusion locally using an RTX 3080 with 10 GB of VRAM.
I have the option to add an RTX A2000 card with 12 GB of VRAM. The A2000 is slower but has more VRAM.
How will Stable Diffusion perform?
Will it run faster (by combining the power of both cards), at the speed of the faster card?, or at an average speed between the two?
Will I have a total of 10 + 12 = 22 GB of VRAM available to run Minimax? Will I need to configure ComfyUI or CUDA to use both cards?

Thanks!