TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.52k stars 1.31k forks source link

Tiny Query - Gradio Blocks error #2059

Closed duskfallcrew closed 1 year ago

duskfallcrew commented 1 year ago

I'm assuming now i'm using a new version this error:

FileNotFoundError Traceback (most recent call last) in <cell line: 47>() 49 srv=ngrok.connect(7860, pyngrok_config=conf.PyngrokConfig(auth_token=Ngrok_token) , bind_tls=True).public_url 50 ---> 51 for line in fileinput.input('/usr/local/lib/python3.9/dist-packages/gradio/blocks.py', inplace=True): 52 if line.strip().startswith('self.server_name ='): 53 line = f' self.server_name = "{srv[8:]}"\n'

1 frames /usr/lib/python3.10/fileinput.py in _readline(self) 355 pass 356 # The next few lines may raise OSError --> 357 os.rename(self._filename, self._backupfilename) 358 self._file = open(self._backupfilename, self._mode, 359 encoding=encoding, errors=self._errors)

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.9/dist-packages/gradio/blocks.py' -> '/usr/local/lib/python3.9/dist-packages/gradio/blocks.py.bak' Shouldn't be an issue...

THOUGH I made a new copy of the newest one and Google KICKED My rats butt off drive with this error: Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 151, in model_hash ConnectionAbortedError: [Errno 103] Software caused connection abort

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 337, in File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 230, in webui File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 111, in initialize File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 91, in setup_model File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 126, in list_models File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 46, in init File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 146, in model_hash OSError: [Errno 107] Transport endpoint is not connected

I'm aware the top was me not using an updated notebook (tho it was only 3 days old XD) - the bottom on'es likely gdrive, so i've opted NOT to use a copy and used main

Even downloading the main model in the new copy was this:

ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error.

ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error.

ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error.

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 185, in <cell line: 148> model=newmdl() File "", line 31, in newmdl get_ipython().run_line_magic('cd', '/content/') File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2418, in run_line_magic result = fn(*args, kwargs) File "", line 2, in cd File "/usr/local/lib/python3.10/dist-packages/IPython/core/magic.py", line 187, in call = lambda f, *a, *k: f(a, k) File "/usr/local/lib/python3.10/dist-packages/IPython/core/magics/osm.py", line 342, in cd oldcwd = os.getcwd() OSError: [Errno 107] Transport endpoint is not connected

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2099, in showtraceback stb = value._rendertraceback() AttributeError: 'OSError' object has no attribute '_rendertraceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1101, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 248, in wrapped return f(*args, kwargs) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 281, in _fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File "/usr/lib/python3.10/inspect.py", line 1662, in getinnerframes frameinfo = (tb.tb_frame,) + getframeinfo(tb, context) File "/usr/lib/python3.10/inspect.py", line 1620, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File "/usr/lib/python3.10/inspect.py", line 829, in getsourcefile module = getmodule(object, filename) File "/usr/lib/python3.10/inspect.py", line 861, in getmodule file = getabsfile(object, _filename) File "/usr/lib/python3.10/inspect.py", line 845, in getabsfile return os.path.normcase(os.path.abspath(_filename)) File "/usr/lib/python3.10/posixpath.py", line 384, in abspath cwd = os.getcwd() OSError: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 185, in <cell line: 148> model=newmdl() File "", line 31, in newmdl get_ipython().run_line_magic('cd', '/content/') File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2418, in run_line_magic result = fn(*args, *kwargs) File "", line 2, in cd File "/usr/local/lib/python3.10/dist-packages/IPython/core/magic.py", line 187, in call = lambda f, a, k: f(*a, **k) File "/usr/local/lib/python3.10/dist-packages/IPython/core/magics/osm.py", line 342, in cd oldcwd = os.getcwd() OSError: [Errno 107] Transport endpoint is not connected

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2099, in showtraceback stb = value._rendertraceback() AttributeError: 'OSError' object has no attribute '_rendertraceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3473, in run_ast_nodes if (await self.runcode(code, result, async=asy)): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3575, in run_code self.showtraceback(running_compiled_code=True) File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2101, in showtraceback stb = self.InteractiveTB.structured_traceback(etype, File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1367, in structured_traceback return FormattedTB.structured_traceback( File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1267, in structured_traceback return VerboseTB.structured_traceback( File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1124, in structured_traceback formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context, File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1082, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 382, in find_recursion return len(records), 0 TypeError: object of type 'NoneType' has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2099, in showtraceback stb = value._rendertraceback() AttributeError: 'TypeError' object has no attribute '_rendertraceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1101, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 248, in wrapped return f(*args, kwargs) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 281, in _fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File "/usr/lib/python3.10/inspect.py", line 1662, in getinnerframes frameinfo = (tb.tb_frame,) + getframeinfo(tb, context) File "/usr/lib/python3.10/inspect.py", line 1620, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File "/usr/lib/python3.10/inspect.py", line 829, in getsourcefile module = getmodule(object, filename) File "/usr/lib/python3.10/inspect.py", line 861, in getmodule file = getabsfile(object, _filename) File "/usr/lib/python3.10/inspect.py", line 845, in getabsfile return os.path.normcase(os.path.abspath(_filename)) File "/usr/lib/python3.10/posixpath.py", line 384, in abspath cwd = os.getcwd() OSError: [Errno 107] Transport endpoint is not connected Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 185, in <cell line: 148> model=newmdl() File "", line 31, in newmdl get_ipython().run_line_magic('cd', '/content/') File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2418, in run_line_magic result = fn(*args, *kwargs) File "", line 2, in cd File "/usr/local/lib/python3.10/dist-packages/IPython/core/magic.py", line 187, in call = lambda f, a, k: f(*a, **k) File "/usr/local/lib/python3.10/dist-packages/IPython/core/magics/osm.py", line 342, in cd oldcwd = os.getcwd() OSError: [Errno 107] Transport endpoint is not connected

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2099, in showtraceback stb = value._rendertraceback() AttributeError: 'OSError' object has no attribute '_rendertraceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3473, in run_ast_nodes if (await self.runcode(code, result, async=asy)): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3575, in run_code self.showtraceback(running_compiled_code=True) File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2101, in showtraceback stb = self.InteractiveTB.structured_traceback(etype, File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1367, in structured_traceback return FormattedTB.structured_traceback( File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1267, in structured_traceback return VerboseTB.structured_traceback( File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1124, in structured_traceback formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context, File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1082, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 382, in find_recursion return len(records), 0 TypeError: object of type 'NoneType' has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2099, in showtraceback stb = value._rendertraceback() AttributeError: 'TypeError' object has no attribute '_rendertraceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3030, in _run_cell return runner(coro) File "/usr/local/lib/python3.10/dist-packages/IPython/core/async_helpers.py", line 78, in _pseudo_sync_runner coro.send(None) File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3257, in run_cell_async has_raised = await self.run_ast_nodes(code_ast.body, cell_name, File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3492, in run_ast_nodes self.showtraceback() File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2101, in showtraceback stb = self.InteractiveTB.structured_traceback(etype, File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1367, in structured_traceback return FormattedTB.structured_traceback( File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1267, in structured_traceback return VerboseTB.structured_traceback( File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1142, in structured_traceback formatted_exceptions += self.format_exception_as_a_whole(etype, evalue, etb, lines_of_context, File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1082, in format_exception_as_a_whole last_unique, recursion_repeat = find_recursion(orig_etype, evalue, records) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 382, in find_recursion return len(records), 0 TypeError: object of type 'NoneType' has no len()

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 2099, in showtraceback stb = value._rendertraceback() AttributeError: 'TypeError' object has no attribute '_rendertraceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 1101, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 248, in wrapped return f(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/IPython/core/ultratb.py", line 281, in _fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File "/usr/lib/python3.10/inspect.py", line 1662, in getinnerframes frameinfo = (tb.tb_frame,) + getframeinfo(tb, context) File "/usr/lib/python3.10/inspect.py", line 1620, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File "/usr/lib/python3.10/inspect.py", line 829, in getsourcefile module = getmodule(object, filename) File "/usr/lib/python3.10/inspect.py", line 861, in getmodule file = getabsfile(object, _filename) File "/usr/lib/python3.10/inspect.py", line 845, in getabsfile return os.path.normcase(os.path.abspath(_filename)) File "/usr/lib/python3.10/posixpath.py", line 384, in abspath cwd = os.getcwd() OSError: [Errno 107] Transport endpoint is not connected

duskfallcrew commented 1 year ago

Ok using the NOT COPIED NOTEBOOK : Notebook From https://github.com/TheLastBen/fast-stable-diffusion, if you encounter any issues, feel free to discuss them. Support [1] 24s Connect Google Drive Shared_Drive: Insert text here Leave empty if you're not using a shared drive

[2] 27s Install/Update AUTOMATIC1111 repo Use_Latest_Working_Commit:

Use the pre-major A1111 update commit to avoid bugs while the repo is fixed

[3] 26s Requirements

[4] 1m Model Download/Load Model_Version:

1.5 Redownload_the_original_model:

Or

Path_to_MODEL: Insert text here Insert the full path of your trained model or to a folder containing multiple models Or

MODEL_LINK: https://huggingface.co/Duskfallcrew/my_merged_models/resolve/main/Anything4EpicLuustUdon.safetensors safetensors:

Use_temp_storage:

[5] 16s ControlNet Model:

None v2_Model:

None Download/update ControlNet extension and its models

[6] 3m Start Stable-Diffusion Use_Cloudflare_Tunnel:

Offers better gradio responsivity Ngrok_token: 2LIWj557ScCBkIeKybshqyAPC8k_3KgSJ6NeMxipZCmsZ74yj Input your ngrok token if you want to use ngrok server User: Insert text here Password: Insert text here Add credentials to your Gradio interface (optional) Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 151, in model_hash OSError: [Errno 107] Transport endpoint is not connected

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 337, in File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 230, in webui File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 111, in initialize File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 91, in setup_model File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 126, in list_models File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 46, in init File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 146, in model_hash OSError: [Errno 107] Transport endpoint is not connected

Grumbles Not Lastben's fault i'm sure it's google coming after users

TheLastBen commented 1 year ago

use the latest notebook https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb and see if the errors persist

duskfallcrew commented 1 year ago

I'll try again today, they were persisting as of yesterday morning, I was able to use a DIFFERENT notebook (which i swap between depending on needs) - Also noting: JUIST CAUSE IM A CRANKY NOTEBOOK USER doesn't mean i don't appreciate your good work!

duskfallcrew commented 1 year ago

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 151, in model_hash OSError: [Errno 107] Transport endpoint is not connected

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 337, in File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 230, in webui File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 111, in initialize File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 91, in setup_model File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 126, in list_models File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 46, in init File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 146, in model_hash OSError: [Errno 107] Transport endpoint is not connected

I shoudl've checked this over the weekend but i waited until i was on stream LMAO. Man i'm gonna whine at google XD

duskfallcrew commented 1 year ago

I think this COULD be an issue where i need to reconnect before hitting the start - but ALSO, i think that it could be a storage issue it gets cranky after i download stuff - so i've shuffled stuff into folders and hoping for the best

duskfallcrew commented 1 year ago

YEP! Fixed! It's cause i keep stacking a ton of stuff in ONE folder, which can get mitigated by moving things in different folders