MCPcopy Create free account
hub / github.com/aistudynow/Comfyui-bitdance

github.com/aistudynow/Comfyui-bitdance @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
198 symbols 477 edges 10 files 9 documented · 5% updated 6mo ago★ 333 open issues

Browse by type

Functions 163 Types & classes 35
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ComfyUI BitDance Nodes

Make sure: BitDance Loader -> quantization = fp8_e4m3fn_scaled

Changelog / Updates

  • Fixed BitDanceSampler crash with guidance_scale > 1.0 when positive/negative prompts have different token lengths (separate attention masks are now built for cond/uncond cache lengths). Thanks to user @hl2dm

- Feb 2026: Fixed severe OOM crash on 16GB-24GB cards at high resolutions (1024px+). The VRAM manager now forcibly unloads and explicitly restores comfy.model_management.unload_all_models() between the LLM text encoding, Vision sampling, and VAE decoding, allowing high-resolution inference!

This package adds BitDance nodes for ComfyUI with a single loader and modular encode/sampler/VAE nodes.

Nodes

  • BitDance Loader -> BITDANCE_MODEL, BITDANCE_TEXT_ENCODER, BITDANCE_VAE
  • BitDance Text Encode -> positive, negative, positive_prompt
  • BitDance Text Encode Cached -> positive, negative, positive_prompt
  • BitDance Sampler -> BITDANCE_LATENT
  • BitDance VAE Decode -> IMAGE
  • BitDance VAE Encode -> BITDANCE_LATENT

Install

  1. Copy this folder into ComfyUI custom nodes (folder name can be anything), for example: ComfyUI/custom_nodes/Comfyui-bitdance-native
  2. Install dependencies in your ComfyUI Python environment: pip install -r ComfyUI/custom_nodes/Comfyui-bitdance-native/requirements.txt
  3. Restart ComfyUI.

Model File Locations (3-file setup)

Place your converted files in standard ComfyUI folders:

  • Main model -> ComfyUI/models/diffusion_models/BitDance_14B_MainModel_FP8.safetensors
  • Text encoder -> ComfyUI/models/text_encoders/BitDance_TextEncoder_FP8.safetensors
  • VAE -> ComfyUI/models/vae/BitDance_VAE_FP16.safetensors

Tokenizer files are bundled with this node package, so a separate tokenizer folder in models/ is not required for local mode.

Resources

Workflow (Current)

  1. Add BitDance Loader
  2. Add BitDance Text Encode Cached (recommended)
  3. Add BitDance Sampler
  4. Add BitDance VAE Decode
  5. Add ComfyUI PreviewImage (local user preview)

Connect:

  • BitDance Loader.bitdance_text_encoder -> BitDance Text Encode Cached.text_encoder
  • BitDance Loader.bitdance_model -> BitDance Text Encode Cached.model_to_offload (optional, for VRAM management)
  • BitDance Text Encode Cached.positive -> BitDance Sampler.positive
  • BitDance Text Encode Cached.negative -> BitDance Sampler.negative
  • BitDance Loader.bitdance_model -> BitDance Sampler.model
  • BitDance Loader.bitdance_vae -> BitDance Sampler.vae
  • BitDance Sampler.bitdance_latent -> BitDance VAE Decode.bitdance_latent
  • BitDance Loader.bitdance_vae -> BitDance VAE Decode.vae
  • BitDance VAE Decode.image -> PreviewImage.images

Starter workflow JSON:

  • workflows/BitDance_Starter.json

Notes

  • BitDance is autoregressive and is not a standard UNet denoiser. Use BitDance Sampler for generation.
  • The loader supports single-file converted checkpoints and bundle-style BitDance layouts.
  • FP8 + scale loading is supported for converted files (mixed-precision runtime behavior depends on selected loader mode).

Changelog / Updates

  • Feb 2026: Fixed severe OOM crash on 16GB-24GB cards at high resolutions (1024px+). The VRAM manager now forcibly unloads and explicitly restores comfy.model_management.unload_all_models() between the LLM text encoding, Vision sampling, and VAE decoding, allowing high-resolution inference!

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 88
Method 75
Class 35

Languages

Python100%

Modules by API surface

nodes.py114 symbols
bitdance_arch/vision_encoder/autoencoder.py29 symbols
bitdance_arch/vision_head/flow_head_parallel_x.py28 symbols
local_model.py19 symbols
bitdance_arch/vision_head/sampling_x.py7 symbols
bitdance_arch/utils_fs.py1 symbols

For agents

$ claude mcp add Comfyui-bitdance \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page