DiffusionGemma Prompt Builder
Five-node DiffusionGemma Director Assistant bridge for ComfyUI LTX workflows.
Nodes (5)
ComfyUI DiffusionGemma Prompt Builder
Five DiffusionGemma Director Assistant nodes for ComfyUI workflows that use DiffusionGemma as a multimodal prompt writer, not as the image or video sampler.
This release is packaged around the working LTX 2.3 character motion-transfer workflow in examples/07_ltx23_character_motion_transfer.json.
Exported Nodes
Only the nodes used by the packaged workflow are registered in ComfyUI:
DiffusionGemmaModelLoader- loads the local Transformers/NVFP4 DiffusionGemma runtime.DiffusionGemmaContextHub- combines user text, optional image/video inputs, and optionalvisual_descriptioninto oneDG_CONTEXT.DiffusionGemmaTargetProfile- stores target generation settings such as LTX profile, audio mode, duration, aspect ratio, and negative prompt policy.DiffusionGemmaCoTGenerator- asks DiffusionGemma for the final prompt packet and returns final JSON plus debug outputs.DiffusionGemmaJSONSplitter- turns the final JSON into LTX prompt, negative prompt, metadata, resolution, segment, and readiness outputs.
Older compatibility and utility classes remain in source where the final nodes still reuse helper behavior internally, but they are not exported as ComfyUI nodes in this package.
Packaged Workflow
The release workflow is:
examples/07_ltx23_character_motion_transfer.json
It uses a reference image for character identity and a source video for pose, motion, camera choreography, depth, Canny/edge structure, composition, timing, and scene geometry. It includes Canny, Depth, and DWPose control branches for comparison.
Bundled media lives in:
examples/assets/character_motion_transfer
Before running the workflow, copy that folder to:
ComfyUI/input/character_motion_transfer
The workflow expects these input paths:
character_motion_transfer/character_reference.png
character_motion_transfer/motion_control_video.mp4
The demo output is also included:
examples/assets/character_motion_transfer/diffusiongemma_ltx_character_demo.mp4
examples/assets/character_motion_transfer/diffusiongemma_ltx_character_demo.gif
Recommended Wiring
For custom workflows, the core DiffusionGemma path is:
Text String -> DiffusionGemma Context Hub
Image or Video -> DiffusionGemma Context Hub
DiffusionGemma Target Profile -> DiffusionGemma CoT Generator
DiffusionGemma Model Loader (Advanced) -> DiffusionGemma CoT Generator
DiffusionGemma Context Hub -> DiffusionGemma CoT Generator
DiffusionGemma CoT Generator.final_json -> DiffusionGemma JSON Splitter
DiffusionGemma JSON Splitter.ltx_prompt -> LTX positive prompt input
DiffusionGemma JSON Splitter.negative_prompt -> LTX negative prompt input
DiffusionGemma JSON Splitter.ready_for_generation -> generation gate or manual check
Use image_identity_video_control on the Context Hub when the reference image should define the output subject while the video provides motion, pose, camera, depth, Canny/edge layout, blocking, and timing.
Runtime Dependencies
This pack assumes a working ComfyUI install with CUDA-capable PyTorch. The Python dependencies declared in requirements.txt are:
transformers>=5.12.1accelerate>=1.14.0comfy-kitchen>=0.2.10jsonschema>=4.26.0safetensors>=0.7.0tqdm>=4.67.0
The NVFP4 bridge also depends on ComfyUI exposing comfy.quant_ops and comfy.ops. On this workstation, comfy-kitchen==0.2.10 is installed and the proof gate passes.
The local bridge does not require bundling a custom tensor file. It converts the ModelOpt NVFP4 tensors from the Hugging Face checkpoint at runtime: ModelOpt FP4 nibble order and weight_scale layout are adapted into Comfy's packed NVFP4 expert matmul layout. Keep the model weights as a normal Hugging Face repo folder and ship only the node source code.
Models Used By The Example
DiffusionGemma prompt model:
Place the whole repo folder at:
ComfyUI/models/LLM/diffusiongemma-26B-A4B-it-NVFP4
LTX 2.3 diffusion model:
Place in:
ComfyUI/models/unet
LTX IC-LoRAs:
Place in:
ComfyUI/models/loras
VAEs:
- Kijai/LTX2.3_comfy - LTX23_video_vae_bf16.safetensors
- Kijai/LTX2.3_comfy - LTX23_audio_vae_bf16.safetensors
Place in:
ComfyUI/models/vae
Text encoders:
- Comfy-Org/ltx-2 - gemma_3_12B_it_fp4_mixed.safetensors
- Kijai/LTX2.3_comfy - ltx-2.3_text_projection_bf16.safetensors
Place in:
ComfyUI/models/text_encoders
Latent upscaler:
Place in:
ComfyUI/models/latent_upscale_models
Custom Node Dependencies For The Example
Install missing packs through ComfyUI Manager when possible:
ComfyUI-LTXVideocomfyui-videohelpersuitecomfyui-kjnodescomfyui_controlnet_auxcomfyui_essentialscomfyui-easy-useRES4LYF
Core ComfyUI supplies several additional LTX nodes used by the workflow, including video loaders, LTX preprocessing/conditioning, samplers, latent/audio/video split and concat nodes, and latent upscaler loading.
Proof Gate
The pack imports without loading DiffusionGemma. Before using the real NVFP4 backend, run:
C:\ComfyUI\.venv\Scripts\python.exe custom_nodes\ComfyUI-DiffusionGemmaPromptBuilder\proof_gates.py --model-path C:\ComfyUI\models\LLM\diffusiongemma-26B-A4B-it-NVFP4
A good NVFP4 result reports:
AutoProcessorresolves.DiffusionGemmaForBlockDiffusionimports from Transformers.- CUDA is available.
comfy_nvfp4_bridge_supportedis true.- The NVFP4 bridge smoke test passes.
Packaging Notes
pyproject.toml is included for GitHub and Comfy Registry readiness. The Comfy Registry requires a real publisher id; if exportAnything is not the exact Registry publisher id, update [tool.comfy].PublisherId before publishing.
The current GitHub repository URL in metadata is:
https://github.com/exportAnything/ComfyUI-DiffusionGemmaPromptBuilder
License
MIT License. See LICENSE.