Skip to content

Feat/batch nodes - #442

Open
lukiod wants to merge 6 commits into
livepeer:mainfrom
lukiod:feat/batch-nodes
Open

Feat/batch nodes#442
lukiod wants to merge 6 commits into
livepeer:mainfrom
lukiod:feat/batch-nodes

Conversation

@lukiod

@lukiod lukiod commented Sep 27, 2025

Copy link
Copy Markdown

No description provided.

Comment thread nodes/tensor_utils/load_tensor.py Outdated
Comment thread src/comfystream/tensor_cache.py Outdated
@eliteprox

Copy link
Copy Markdown
Collaborator

Can you also add an engine build command to entrypoint.sh? This worked for me:

  # Build Static Engine for Dreamshaper - Square (512x512) - Batch Size 2
  python src/comfystream/scripts/build_trt.py --model /workspace/ComfyUI/models/unet/dreamshaper-8-dmd-1kstep.safetensors --out-engine /workspace/ComfyUI/output/tensorrt/static-dreamshaper8_SD15_\$stat-b-2-h-512-w-512_00001_.engine --width 512 --height 512 --batch-size 2

You can ignore (or even remove) the multi-resolution builds as they are not used anymore (only slows down the script)

# Build Static Engine for Dreamshaper - Portrait (384x704)
python src/comfystream/scripts/build_trt.py --model /workspace/ComfyUI/models/unet/dreamshaper-8-dmd-1kstep.safetensors --out-engine /workspace/ComfyUI/output/tensorrt/static-dreamshaper8_SD15_\$stat-b-1-h-704-w-384_00001_.engine --width 384 --height 704
# Build Static Engine for Dreamshaper - Landscape (704x384)
python src/comfystream/scripts/build_trt.py --model /workspace/ComfyUI/models/unet/dreamshaper-8-dmd-1kstep.safetensors --out-engine /workspace/ComfyUI/output/tensorrt/static-dreamshaper8_SD15_\$stat-b-1-h-384-w-704_00001_.engine --width 704 --height 384

@lukiod

lukiod commented Oct 1, 2025

Copy link
Copy Markdown
Author

@eliteprox which changes request is this i cant see it

@eliteprox eliteprox left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lukiod I apologize for the delay getting back to you. I've tested the latest changes and still had issues with flickering frames. We recently had to fix some linting issues in the main branch, so please rebase and I will take a look.

Again, I apologize for the delay, this has been a lower priority feature since we have been working to ship BYOC pipelines and there were some overlapping changes in this PR.

Thank you again for this contribution, I've added the PR to our current planning cycle to maintain more visibility on this feature, as it is important to our roadmap. If it remains stale, we will pick up the feature in a coming sprint

@lukiod

lukiod commented Sep 1, 2026

Copy link
Copy Markdown
Author

rebased. found the likely cause of the flickering while doing it: short batches were padding with a duplicated last frame instead of blocking for a real one. loader now blocks per-frame with the timeout and raises instead of padding, so a batch is always N real frames. also dropped the queue-maxsize bump and a later pipeline-side commit that was fighting your state-manager refactor — kept the PR to LoadTensor's batch_size + SaveTensor's split_batch, no pipeline changes.

heads up: i don't have a GPU streaming setup here so i couldn't actually re-test for flickering, just fixed the mechanism i think caused it. let me know if it's still there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile Dreamshaper and DepthAnything 2 engines with batch size of 2

2 participants