Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Colab version pointing to Google Drive folder for ckpts? #12

Open
bennitheblog opened this issue Nov 24, 2022 · 5 comments
Open

Comments

@bennitheblog
Copy link

Thank you for this code. Tried this locally but my computer did not have enough memory to execute this. Any chance someone can please create a Google Colab notebook that executes this code and can merge ckpts located in a Google Drive folder?

Thanks in advance.

@ogkalu2
Copy link
Owner

ogkalu2 commented Nov 26, 2022

Hi. There's been quite a number of optimizations since the so you may want to try again.
Regardless, here you go
https://colab.research.google.com/drive/1hQd6vyF-L5XgBErCjmEZX8hazYt0-iXo?usp=sharing

@bennitheblog
Copy link
Author

Thank you! I ran this and got this error:

Traceback (most recent call last):
File "SD_rebasin_merge.py", line 5, in
File "/content/drive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/weight_matching.py", line 5, in
File "", line 983, in _find_and_load
File "", line 963, in _find_and_load_unlocked
File "", line 906, in _find_spec
File "", line 1280, in find_spec
File "", line 1252, in _get_spec
File "", line 1368, in find_spec
File "", line 1408, in _fill_cache
OSError: [Errno 107] Transport endpoint is not connected: '/content/drive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion'

@bennitheblog
Copy link
Author

/content/drive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion
is where I've saved everything; your code files and also my ckpts.

@bennitheblog
Copy link
Author

Yes, everything is in that folder.

@bennitheblog
Copy link
Author

Tried to rerun and here is the updated error message:

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.7/dist-packages/IPython/core/interactiveshell.py", line 3326, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
get_ipython().run_line_magic('cd', '/content/drive/MyDrive/sd/stable-diffusion-webui/models/Stable-diffusion/')
File "/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py", line 2314, in run_line_magic
result = fn(*args, **kwargs)
File "", line 2, in cd
File "/usr/local/lib/python3.7/dist-packages/IPython/core/magic.py", line 187, in
call = lambda f, *a, **k: f(*a, **k)
File "/usr/local/lib/python3.7/dist-packages/IPython/core/magics/osm.py", line 334, 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.7/dist-packages/IPython/core/interactiveshell.py", line 2040, in showtraceback
stb = value.render_traceback()
AttributeError: 'OSError' object has no attribute 'render_traceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/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.7/dist-packages/IPython/core/ultratb.py", line 319, in wrapped
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/IPython/core/ultratb.py", line 353, in _fixed_getinnerframes
records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
File "/usr/lib/python3.7/inspect.py", line 1502, in getinnerframes
frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
File "/usr/lib/python3.7/inspect.py", line 1460, in getframeinfo
filename = getsourcefile(frame) or getfile(frame)
File "/usr/lib/python3.7/inspect.py", line 696, in getsourcefile
if getattr(getmodule(object, filename), 'loader', None) is not None:
File "/usr/lib/python3.7/inspect.py", line 725, in getmodule
file = getabsfile(object, _filename)
File "/usr/lib/python3.7/inspect.py", line 709, in getabsfile
return os.path.normcase(os.path.abspath(_filename))
File "/usr/lib/python3.7/posixpath.py", line 383, in abspath
cwd = os.getcwd()
OSError: [Errno 107] Transport endpoint is not connected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants