Skip to content

Repository files navigation

GitHub License ComfyUI Telegram

πŸ¦–πŸŽ¬ Seedance 2.0 ComfyUI Node β€” Sjinn.ai API

Generate stunning videos with ByteDance Seedance 2.0 directly in ComfyUI via Sjinn.ai

"The most convenient way to access ByteDance Seedance 2.0 directly inside ComfyUI β€” connect your reference images, write a prompt, click Run."

Author: Voogie | Project: Cameraptor | cameraptor.com/voogie


Workflow Preview

Example workflow: 2 reference images + 1 reference video β†’ Seedance 2.0 β†’ output


πŸ€” What is this?

Sjinn.ai is an AI platform giving Pro+ members API access to ByteDance's Seedance 2.0 β€” one of the most capable video generation models available. This ComfyUI node wraps the Sjinn.ai API so you can run Seedance 2.0 generations directly in your workflow: connect reference images and videos, write a prompt, click Run. Cost: 100 credits per second of output video β€” a 5-second video costs 500 credits.


✨ Features

Feature Details
πŸ–ΌοΈ Reference images Up to 6 β€” connect any Load Image node to image_1 through image_6
πŸŽ₯ Reference videos Up to 3 β€” connect the vanilla ComfyUI Load Video node to video_1 through video_3
πŸ“ Aspect ratios 16:9, 9:16, 1:1, 4:3, 3:4
⏱️ Duration 4 to 15 seconds (100 credits per second)
🎞️ First frame preview IMAGE output β€” pipe into upscaler, preview node, or any image workflow
πŸ“Š Real-time console log Progress printed every 15 seconds with elapsed time and attempt count

πŸ“¦ Prerequisites

  • ComfyUI (v0.14+ recommended β€” uses native VIDEO type)
  • Sjinn.ai Pro+ account β€” https://sjinn.ai (required for API access)
  • ComfyUI Manager (for easy installation)
  • ComfyUI-VideoHelperSuite β€” required for the included example workflow (Seedance_2_By_Voogie.json)
  • opencv-python β€” for first_frame extraction (auto-installed via requirements.txt)

πŸ’‘ The vanilla Load Video node ships with ComfyUI v0.14+ β€” no extra install needed for video inputs.


πŸš€ Installation

Method 1: Via ComfyUI Manager ⭐ (Recommended)

  1. Launch ComfyUI and open the Manager
  2. Click Install via Git URL
  3. Paste the repository URL:
    https://github.com/Cameraptor/seedance_2_Comfy_UI_Node-sjinn_Api-
    
  4. Click Install (dependencies will be installed automatically)
  5. Restart ComfyUI completely

Method 2: Manual Installation

  1. Navigate to your ComfyUI/custom_nodes/ directory and clone:

    git clone https://github.com/Cameraptor/seedance_2_Comfy_UI_Node-sjinn_Api-
    cd seedance_2_Comfy_UI_Node-sjinn_Api-
  2. Install dependencies using ComfyUI's Python:

    Windows (portable):

    ..\..\python_embeded\python.exe -m pip install -r requirements.txt

    Linux / Mac:

    ../../python/bin/python -m pip install -r requirements.txt
  3. Restart ComfyUI completely


πŸ”‘ Getting Your Credentials

This is the most important section β€” the node requires two separate credentials from Sjinn.ai. Both are required.

API Key

  1. Go to https://sjinn.ai/ and log in
  2. Click your profile avatar (top right)
  3. Navigate to the API Keys section
  4. Click Create new key, give it a name
  5. Copy the key immediately (shown only once)
  6. Paste into the api_key field of the Seedance 2.0 node

⚠️ The API key is used only for polling task status. You also need a session token (see below) for file uploads and task creation β€” they use different authentication.

Session Token

The session token is a browser cookie that Sjinn.ai uses to authenticate file uploads and video generation requests. You need to grab it from your browser's DevTools β€” here's exactly how:

Step 1 β€” Open the page and log in

Go to https://sjinn.ai/tools/seedance20-video in your browser and make sure you are logged in with a Pro+ account.

Step 2 β€” Open Developer Tools

Press F12 on your keyboard (or right-click anywhere on the page β†’ Inspect). A panel will open at the bottom or side of your browser window.

Step 3 β€” Navigate to the cookies

  • Chrome / Edge: Click the Application tab at the top of the DevTools panel
  • Firefox: Click the Storage tab

Then in the left sidebar, expand the tree:

β–Ό Storage
  β–Ό Cookies
      https://sjinn.ai   ← click this

πŸ’‘ If you don't see the Application / Storage tab, click the Β» arrow at the end of the tab bar β€” it may be hidden.

Step 4 β€” Find the right cookie

A table of cookies will appear on the right. Look for the one named:

__Secure-next-auth.session-token

⚠️ There are many cookies in the list β€” you need exactly this one. Use Ctrl+F to search if the list is long.

Step 5 β€” Copy the value

Click on that cookie row. At the bottom of the DevTools panel you'll see the full value β€” it's a very long string that starts with eyJ...

To copy it correctly:

  1. Click anywhere in the value field at the bottom
  2. Press Ctrl+A to select all (the value is too long to see fully in the table row)
  3. Press Ctrl+C to copy

⚠️ Don't copy from the table row β€” the value is truncated there. Always copy from the bottom preview panel where the full string is shown.

Step 6 β€” Paste into the node

Paste the copied value into the session_token field of the Seedance 2.0 node in ComfyUI. The value should start with eyJ and be several hundred characters long β€” if it's short, something went wrong.


⚠️ Token expiry: The session token is valid as long as you stay logged into Sjinn.ai (typically days to weeks). If you get 401 errors, your session expired β€” log in again and repeat the steps above to get a fresh token.

πŸ’‘ Why not just use the API key for everything? Sjinn.ai's video creation and upload endpoints only accept the session cookie β€” Bearer API keys return 401 there. The API key is used only for polling task status. Both credentials are required.


πŸ•ΉοΈ How to Use

Find the πŸ¦–πŸŽ¬ Seedance 2.0 node in the πŸ¦–Cameraptor_Nodes / Sjinn.ai menu, or search "Seedance" in ComfyUI node search.

  1. Connect reference images: Load Image β†’ image_1 (up to 6 total)
  2. Connect reference videos: Load Video β†’ video_1 (up to 3 total)
  3. Write your prompt β€” use @Image1, @Image2, @Video1 etc. to reference your inputs
    • Example: @Image1 is FIRST FRAME. @Image2 is the vehicle reference. @Video1 is camera motion reference.
  4. Set ratio and duration
  5. Enter your session_token and api_key
  6. Click Queue Prompt β€” the node uploads assets, submits the task, and polls every 15 seconds
  7. When complete: video_url output contains the direct MP4 link

πŸ’‘ Connect video_url to any save or download node. Connect first_frame to a Preview Image node to see the result instantly without downloading.


πŸ“‹ Node Parameters

Inputs β€” Required:

Parameter Type Description
session_token STRING NextAuth browser cookie from sjinn.ai (see Getting Credentials)
api_key STRING Sjinn.ai API key β€” used for status polling only
prompt STRING Text prompt. Use @Image1..@Image6, @Video1..@Video3 to reference inputs

Inputs β€” Optional:

Parameter Type Description
image_1 .. image_6 IMAGE Reference images β€” connect Load Image nodes
video_1 .. video_3 VIDEO Reference videos β€” connect vanilla Load Video node
ratio COMBO Output aspect ratio: 16:9 / 9:16 / 1:1 / 4:3 / 3:4 (default: 16:9)
duration COMBO Output duration in seconds: 4–15 (default: 5)

Outputs:

Output Type Description
video_url STRING Direct HTTPS URL to the generated MP4 file
info STRING Summary: task_id, elapsed time, ratio, duration, asset counts
first_frame IMAGE First frame of the video β€” for preview or chaining into image workflows

πŸ’° Cost Reference

Duration Credits Used
4s 400 credits
5s 500 credits
10s 1,000 credits
15s 1,500 credits

πŸ’‘ Check your credit balance at https://sjinn.ai before running long generations.

βœ… Content policy: If your prompt violates platform rules, the task returns status=2 (failed) and credits are automatically refunded.


πŸ’‘ Prompt Tips & Best Practices

  • Use @Image1, @Image2... to explicitly tell the model which image is which
  • Put the most important reference first (image_1)
  • @Video1 works well for camera motion and composition reference
  • Avoid brand names in prompts β€” may trigger content filters (credits refunded if so)
  • For character consistency: put character reference in @Image2, scene in @Image1
  • Duration 4–5s generates faster and costs less β€” good for testing prompts before running full duration

πŸ“¦ Example Workflow

The file Seedance_2_By_Voogie.json is an example workflow included in this repository.

To load: Drag the JSON file onto the ComfyUI canvas, or use Load from the menu.

The workflow demonstrates:

  • 2Γ— Load Image β†’ Seedance 2.0 (image_1 + image_2)
  • 1Γ— Load Video β†’ Seedance 2.0 (video_1)
  • Seedance 2.0 β†’ πŸ¦–πŸ’Ύ Save API Video β€” downloads the MP4 and loads frames
  • Seedance 2.0 first_frame β†’ Preview Image (instant thumbnail in ComfyUI)
  • Save API Video frames β†’ VHS Video Combine β€” preview video in ComfyUI

⚠️ Requirements for the example workflow:

  • ComfyUI-VideoHelperSuite β€” for the VHS Video Combine node. Install via ComfyUI Manager β†’ search "VideoHelperSuite".

πŸ› οΈ Troubleshooting

Issue Likely Cause Fix
401 Unauthorized during upload or task creation Session token expired or invalid Log into sjinn.ai, get a fresh cookie value from DevTools
Read timed out (task creation) sjinn.ai server slow to respond Retry β€” this is not a code bug and usually resolves itself
Task failed: status=2 Content policy violation in prompt Remove brand names, soften motion descriptions
video_1 socket not visible Old ComfyUI version (pre VIDEO type) Update ComfyUI to v0.14+
No videos in Load Video dropdown No .mp4 files in ComfyUI/input/ Copy .mp4 files into ComfyUI/input/, then refresh
first_frame is black 64Γ—64 opencv-python not installed Run: pip install opencv-python
Task hangs for more than 15 minutes Server-side issue or timeout Check sjinn.ai status, retry the generation

πŸ” Optional: Local Credentials File

To avoid re-entering credentials every session, create sjinn_config.py in the node folder:

SJINN_API_KEY = "your-api-key-here"
SJINN_SESSION_TOKEN = "your-session-token-here"

The node loads it automatically if present, falls back to empty fields if not.

⚠️ Security: Never commit this file to git. It is listed in .gitignore β€” keep it that way.


πŸ“ Requirements

  • ComfyUI installed and running (v0.14+ recommended)
  • Sjinn.ai Pro+ account with credits
  • API key from sjinn.ai profile
  • Session token from browser DevTools
  • Python packages installed (pip install -r requirements.txt)
  • opencv-python installed (for first_frame output)

🀝 Support & Community


πŸ“„ License

MIT License β€” see LICENSE file for details.


Made with ❀️ by Voogie | Cameraptor

Telegram

⭐ Star this repo if you find it useful!

About

No description, website, or topics provided.

Resources

Stars

26 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages