TheLastBen / fast-stable-diffusion

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

problem in google colab pro #2199

Open bronauti opened 1 year ago

bronauti commented 1 year ago

I have this problem when filling out the following box Install/Update AUTOMATIC1111 repo Use_Latest_Working_Commit:

Error loading script: api.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/api.py", line 9, in from modules.api import api File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/api/api.py", line 8, in from gradio.processing_utils import decode_base64_to_file ImportError: cannot import name 'decode_base64_to_file' from 'gradio.processing_utils' (/usr/local/lib/python3.10/dist-packages/gradio/processing_utils.py)

Error loading script: batch_hijack.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 7, in from scripts import external_code File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/external_code.py", line 8, in from modules.api import api File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/api/api.py", line 8, in from gradio.processing_utils import decode_base64_to_file ImportError: cannot import name 'decode_base64_to_file' from 'gradio.processing_utils' (/usr/local/lib/python3.10/dist-packages/gradio/processing_utils.py)

Error loading script: controlnet.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 12, in from scripts import global_state, hook, external_code, processor, batch_hijack, controlnet_version File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/external_code.py", line 8, in from modules.api import api File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/api/api.py", line 8, in from gradio.processing_utils import decode_base64_to_file ImportError: cannot import name 'decode_base64_to_file' from 'gradio.processing_utils' (/usr/local/lib/python3.10/dist-packages/gradio/processing_utils.py)

ControlNet v1.1.189 Error loading script: external_code.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/external_code.py", line 8, in from modules.api import api File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/api/api.py", line 8, in from gradio.processing_utils import decode_base64_to_file ImportError: cannot import name 'decode_base64_to_file' from 'gradio.processing_utils' (/usr/local/lib/python3.10/dist-packages/gradio/processing_utils.py)

Loading weights [a92311f07a] from /content/gdrive/MyDrive/orangechillmix_v70.safetensors Creating model from config: /content/gdrive/MyDrive/sd/stable-diffusion-webui/configs/v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Applying scaled dot product cross attention optimization. Textual inversion embeddings loaded(0): Model loaded in 155.6s (load weights from disk: 147.0s, create model: 4.3s, apply weights to model: 2.5s, apply half(): 1.1s, move model to device: 0.7s). Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 337, in webui() File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 240, in webui shared.demo = modules.ui.create_ui();shared.demo.queue(concurrency_count=999999,status_update_rate=0.1) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 461, in create_ui txt2img_prompt, txt2img_prompt_styles, txt2img_negativeprompt, submit, , _, txt2img_prompt_style_apply, txt2img_save_style, txt2img_paste, extra_networks_button, token_counter, token_button, negative_token_counter, negative_token_button = create_toprow(is_img2img=False) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 284, in create_toprow with gr.Row(elem_id=f"{id_part}_toprow", variant="compact"): File "/usr/local/lib/python3.10/dist-packages/gradio/layouts.py", line 43, in init super().init(visible=visible, elem_id=elem_id, kwargs) File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 274, in init super().init(visible=visible, render=render, kwargs) File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 79, in init self.render() File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 94, in render if isinstance(self, components.TempFileManager): AttributeError: module 'gradio.components' has no attribute 'TempFileManager'

I see that this problem has been occurring for a month now. Is there any solution other than disabling this checkbox? Will the problem be fixed someday? Has anyone found a solution already? I have also tried to resolve this error by deleting all kinds of files in my Google Drive and running fast_stable_diffusion_AUTOMATIC1111 in the cleanest way possible, but nothing has worked.

TheLastBen commented 1 year ago

rename the folder sd to sd_old and try again with the latest notebook https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

outhipped commented 1 year ago

rename the folder sd to sd_old and try again with the latest notebook https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

unfortunately it did not help, i have the same issue.

TheLastBen commented 1 year ago

do a test run by running the notebook without the first cell

bjornlarssen commented 1 year ago

Same issue, just ran it after deleting the previous version completely.

@TheLastBen – what do you mean without the first cell? The connecting of Google Drive? AUTOMATTIC1111? Something else?

outhipped commented 1 year ago

It works when I ignore connecting my Google Drive to the Colab but I would like to eventually be able to do this since this is where I store my trained checkpoints.

czw., 25 maj 2023 o 20:10 bjornlarssen @.***> napisał(a):

Same issue, just ran it after deleting the previous version completely.

@TheLastBen https://github.com/TheLastBen – what do you mean without the first cell? The connecting of Google Drive? AUTOMATTIC1111? Something else?

— Reply to this email directly, view it on GitHub https://github.com/TheLastBen/fast-stable-diffusion/issues/2199#issuecomment-1563311328, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3WEKE34OSPX5NELK7IDYDDXH6OCRANCNFSM6AAAAAAYLDTNXM . You are receiving this because you commented.Message ID: @.***>

TheLastBen commented 1 year ago

@outhipped that means the issue isn't in the notebook

bjornlarssen commented 1 year ago

When I ignore collecting to Google Drive, the WebUI starts, but ControlNet doesn't work. OpenPose generates a black preview and outputs this:

Preview Resolution = 512 Calling preprocessor openpose_full outside of cache. Preview Resolution = 512 Calling preprocessor openpose outside of cache.

When I click Generate:

Loading model: control_v11p_sd15_openpose [cab727d4] Loaded state_dict from [/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_v11p_sd15_openpose.pth] Loading config: /content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/models/control_v11p_sd15_openpose.yaml ControlNet model control_v11p_sd15_openpose [cab727d4] loaded. using mask as input Loading preprocessor: none preprocessor resolution = 512 Calling preprocessor none outside of cache. 100% 20/20 [00:08<00:00, 2.30it/s]

TheLastBen commented 1 year ago

if you're using a real input picture, use the preprocessor, if you're using an openpose input picture (the skeleton only), set the preprocessor to none

bjornlarssen commented 1 year ago

I'm using a real input picture.

One of the latest commits of SOMETHING must have broken it. An alternative notebook, Stable-Diffusion-Art, also doesn't work. Black preview on openpose, crash on reference.

This is my local install: (Mac Mini M2)

python: 3.10.10  •  torch: 2.0.1  •  xformers: N/A  •  gradio: 3.28.1  •  commit: 1e30ae89

Everything works. Veeerrrryyyyyy sloooowwllllyyy… but it does.

Edit: https://github.com/Mikubill/sd-webui-controlnet/issues/1418 – this is from yesterday.

Dreason8 commented 1 year ago

Google Drive seems to be disconnecting after just a few generation

bjornlarssen commented 1 year ago

I discovered Colab requires High RAM not to disconnect.