flowtyone / ComfyUI-Flowty-LDSR

LDSR custom node for ComfyUI
GNU General Public License v3.0
190 stars 14 forks source link

'NoneType' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead. #14

Open AoooooX opened 6 months ago

AoooooX commented 6 months ago

Error occurred when executing LDSRUpscaler:

'NoneType' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.

File "D:\AI\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\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 "D:\AI\ComfyUI\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 "D:\AI\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-LDSR__init__.py", line 124, in upscale outputs.append(ldsr.superResolution(image, int(steps), pre_downscale, post_downscale, downsample_method)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-LDSR\ldsrlib\LDSR.py", line 261, in superResolution model = self.load_model_from_config() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-LDSR\ldsrlib\LDSR.py", line 88, in load_model_from_config self.model = LDSR.load_model_from_path(self.modelPath, self.torchdevice) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Flowty-LDSR\ldsrlib\LDSR.py", line 75, in load_model_from_path pl_sd = torch.load(modelPath, map_location="cpu") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 986, in load with _open_file_like(f, 'rb') as opened_file: ^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 440, in _open_file_like return _open_buffer_reader(name_or_buffer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 425, in init _check_seekable(buffer) File "D:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 534, in _check_seekable raise_err_msg(["seek", "tell"], e) File "D:\AI\ComfyUI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\serialization.py", line 527, in raise_err_msg raise type(e)(msg)