Description
Feature Idea
I had this problem while i was trying to add RES4LYF samplers and schedulers to SwarmUI. to make it work, i had to make a little edition to launcher bat file.
Problem:
I encountered a UnicodeEncodeError
when attempting to load custom nodes like ClownsharkBatwing/RES4LYF
. This error typically occurs because Python's default encoding (often 'charmap' on Windows) struggles with special characters present in some custom node scripts (e.g., mathematical symbols like 'Δ'). This prevents the ComfyUI backend from fully loading, leading to a "Self-Start ComfyUI-0 on port XXXX failed" error in the SwarmUI logs.
Solution:
Adding the environment variable PYTHONUTF8=1
to the launch-windows.bat
file resolves this issue by forcing Python to use UTF-8 encoding, which correctly handles all Unicode characters.
Proposed Change:
Add the line set PYTHONUTF8=1
preferably at the beginning of the launch-windows.bat
file, for example:
@echo off
set PYTHONUTF8=1
setlocal ENABLEDELAYEDEXPANSION
After that change, (and installing the repos needed in backend) now i have a working set of new samplers in SwarmUI/Generate tab which makes HiDream generations much better.