Fix OSError crash from print() on ComfyUI Desktop#118
Open
cuzelac wants to merge 1 commit intovisualbruno:mainfrom
Open
Fix OSError crash from print() on ComfyUI Desktop#118cuzelac wants to merge 1 commit intovisualbruno:mainfrom
cuzelac wants to merge 1 commit intovisualbruno:mainfrom
Conversation
…esktop ComfyUI Desktop's --log-stdout wraps sys.stdout, and its flush() raises OSError: [Errno 22] when the pipe handle goes stale. All 25 print() calls in the pipeline now use logging.info() which bypasses the broken wrapper. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
print()calls intrellis2/pipelines/trellis2_image_to_3d.pywithlogging.info()to fix a crash when running workflows through the ComfyUI API--log-stdoutflag wrapssys.stdoutviacomfyui_manager/prestartup_script.py, and itsflush()raisesOSError: [Errno 22] Invalid argumentwhen the underlying pipe handle goes staleprint()during pipeline execution (e.g. model loading messages) triggers this and crashes mesh generation entirelylogging.info()bypasses the broken stdout wrapper while still producing log outputTraceback
Test plan
Trellis2MeshWithVoxelAdvancedGeneratorvia the API🤖 Generated with Claude Code