jags111 / efficiency-nodes-comfyui

A collection of ComfyUI custom nodes.- Awesome smart way to work with nodes!
https://civitai.com/models/32342
GNU General Public License v3.0
770 stars 79 forks source link

'_io.StringIO' object has no attribute 'sync_write' #214

Open cvar66 opened 2 weeks ago

cvar66 commented 2 weeks ago

Not sure what's happening, never had an issue until recently. When trying to use the Efficacy Loader I always get this error now.

!!! Exception during processing!!! '_io.StringIO' object has no attribute 'sync_write' Traceback (most recent call last): File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 158, in efficientloader model, clip = load_lora(lora_params, ckpt_name, my_unique_id, cache=lora_cache, ckpt_cache=ckpt_cache, cache_overwrite=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\efficiency-nodes-comfyui\tsc_utils.py", line 370, in loadlora ckpt, clip, = load_checkpoint(ckpt_name, id, cache=ckpt_cache) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\efficiency-nodes-comfyui\tsc_utils.py", line 246, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 526, in load_checkpoint_guess_config model = model_config.get_model(sd, diffusion_model_prefix, device=inital_load_device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\comfy\supported_models_base.py", line 60, in get_model out = model_base.BaseModel(self, model_type=self.model_type(state_dict, prefix), device=device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\comfy\model_base.py", line 87, in init logging.info("model_type {}".format(model_type.name)) File "logging__init.py", line 2148, in info File "logging__init.py", line 1489, in info File "logging\init__.py", line 1634, in _log File "logging\init.py", line 1644, in handle File "logging\init.py", line 1706, in callHandlers File "logging\init__.py", line 978, in handle File "C:\SD\comyui\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py", line 326, in emit sys.stderr.sync_write(message+'\n', file_only=True) ^^^^^^^^^^^^^^^^^^^^^ AttributeError: '_io.StringIO' object has no attribute 'sync_write'

jags111 commented 2 weeks ago

let me review this and update. if you can share the exact dummy workflow where this happened it can be very useful

jazcid commented 2 weeks ago

let me review this and update. if you can share the exact dummy workflow where this happened it can be very useful让我回顾一下并更新。如果您可以共享发生这种情况的确切虚拟工作流程,它将非常有用

文生图(含高清重绘)原图2倍放大(加细节).json same issue

Tanglinling commented 2 weeks ago

让我回顾一下并更新。如果你能分享发生这种情况的确切虚拟工作流程,那将非常有用

I just had the same problem, but I was able to use it normally this morning until I updated "comfyui-manager" to the latest version. I returned to normal use after trying to restore the previous version of comfyui-manager, hope my experience was helpful to you.

Light-x02 commented 2 weeks ago

same issue

!!! Exception during processing!!! '_io.StringIO' object has no attribute 'sync_write' Traceback (most recent call last): File "I:\AI\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 151, in efficientloader model, clip = load_lora(lora_params, ckpt_name, my_unique_id, cache=lora_cache, ckpt_cache=ckpt_cache, cache_overwrite=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\custom_nodes\efficiency-nodes-comfyui\tsc_utils.py", line 370, in loadlora ckpt, clip, = load_checkpoint(ckpt_name, id, cache=ckpt_cache) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\custom_nodes\efficiency-nodes-comfyui\tsc_utils.py", line 246, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\comfy\sd.py", line 526, in load_checkpoint_guess_config inital_load_device = model_management.unet_inital_load_device(parameters, unet_dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\comfy\supported_models.py", line 196, in get_model out = model_base.SDXL(self, model_type=self.model_type(state_dict, prefix), device=device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "I:\AI\ComfyUI\ComfyUI\comfy\model_base.py", line 326, in init super().init(model_config, model_type, device=device) File "I:\AI\ComfyUI\ComfyUI\comfy\model_base.py", line 87, in init logging.info("model_type {}".format(model_type.name)) File "C:\Users\Guillaume\AppData\Local\Programs\Python\Python311\Lib\logging__init__.py", line 2148, in info root.info(msg, args, kwargs) File "C:\Users\Guillaume\AppData\Local\Programs\Python\Python311\Lib\logging__init__.py", line 1489, in info self._log(INFO, msg, args, kwargs) File "C:\Users\Guillaume\AppData\Local\Programs\Python\Python311\Lib\logging__init__.py", line 1634, in _log self.handle(record) File "C:\Users\Guillaume\AppData\Local\Programs\Python\Python311\Lib\logging__init.py", line 1644, in handle self.callHandlers(record) File "C:\Users\Guillaume\AppData\Local\Programs\Python\Python311\Lib\logging\init.py", line 1706, in callHandlers hdlr.handle(record) File "C:\Users\Guillaume\AppData\Local\Programs\Python\Python311\Lib\logging\init__.py", line 978, in handle self.emit(record) File "I:\AI\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py", line 326, in emit sys.stderr.sync_write(message+'\n', file_only=True) ^^^^^^^^^^^^^^^^^^^^^ AttributeError: '_io.StringIO' object has no attribute 'sync_write'

FirtheH commented 2 weeks ago

same issue, when trying to use the Efficacy XL Loader, !!! Exception during processing!!! '_io.StringIO' object has no attribute 'sync_write' Traceback (most recent call last): File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 243, in efficientloaderSDXL return super().efficientloader(base_ckpt_name, vae_name, clip_skip, lora_name, lora_model_strength, lora_clip_strength, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 163, in efficientloader model, clip, vae = load_checkpoint(ckpt_name, my_unique_id, cache=ckpt_cache, cache_overwrite=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\efficiency-nodes-comfyui\tsc_utils.py", line 246, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 526, in load_checkpoint_guess_config model = model_config.get_model(sd, diffusion_model_prefix, device=inital_load_device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\supported_models.py", line 196, in get_model out = model_base.SDXL(self, model_type=self.model_type(state_dict, prefix), device=device) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\model_base.py", line 326, in init super().init(model_config, model_type, device=device) File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy\model_base.py", line 87, in init logging.info("model_type {}".format(model_type.name)) File "logging__init.py", line 2148, in info File "logging__init.py", line 1489, in info File "logging\init__.py", line 1634, in _log File "logging\init.py", line 1644, in handle File "logging\init.py", line 1706, in callHandlers File "logging\init__.py", line 978, in handle File "H:\comfy\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\prestartup_script.py", line 326, in emit sys.stderr.sync_write(message+'\n', file_only=True) ^^^^^^^^^^^^^^^^^^^^^ AttributeError: '_io.StringIO' object has no attribute 'sync_write'

Light-x02 commented 2 weeks ago

If it helps, I have this problem using "Efficient Loader". By deleting it, I no longer get the error.

Pxter7777 commented 2 weeks ago

I occurred the same issue, fixed after I updated ComfyUI-Manager. https://github.com/ltdrdata/ComfyUI-Manager/issues/841#issuecomment-2211757944