Giter VIP home page Giter VIP logo

fast-stable-diffusion's Introduction

Shoutout to and for sponsoring the project

fast-stable-diffusion Notebooks, A1111 + ComfyUI + DreamBooth

Runpod & Paperspace & Colab pro adaptations AUTOMATIC1111 Webui and Dreambooth.

                RunPod                                             Paperspace                           Colab(pro)-AUTOMATIC1111


                           

                                                                 Colab(pro)-Dreambooth

                                                            

Dreambooth paper : https://dreambooth.github.io/

SD implementation by @XavierXiao : https://github.com/XavierXiao/Dreambooth-Stable-Diffusion

fast-stable-diffusion's People

Contributors

apolinario avatar bananasss00 avatar daswer123 avatar efreak avatar eltociear avatar isekaidev avatar jab-dev avatar jsmith8858 avatar kaneda2004 avatar matroxi avatar maw-fox avatar nouamanetazi avatar ozunaltun avatar skorokithakis avatar smy20011 avatar swcrazyfan avatar thelastben avatar valdex avatar zdhickman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fast-stable-diffusion's Issues

Version for a local runtime

Right now it's only possible to run these notebooks through Google Colab, but I'm sure many people, myself included, want the ability to run this is a local runtime.

Similarly, I found an issue requesting kaggle support. However, that would still only allow for Colab or Kaggle.

One option would be to create multiple notebooks for the different platforms. Another would be to detect the platform in the notebook, like Disco Diffusion does.

Here I've tried to start porting the hlky notebook to be compatible with a local (and theoretically any platform) notebook, but it doesn't work, and my methods are pretty crude.

Edit: Here has working notebooks, AUTOMATIC1111 and hlky so far.

[Question/Request] Automatic1111 web UI implementation for Kaggle?

Just a question, despite having limited time to 40Hs per week Kaggle has better GPUs and a higher tolerance to waiting for execution processes.

Instead of using a

#@markdown # Patching attention.py
%%writefile /content/gdrive/MyDrive/sd/stable-diffusion-webui/ldm/modules/attention.py

my code here

You should use a

file = """
my code here
"""
#"/kaggle/working" is equal to "/content"
f = open("/kaggle/working/gdrive/MyDrive/sd/stable-diffusion-webui/ldm/modules/attention.py", "w")
f.write(file)
f.close()

The downside is that it is not integrated with google drive but it has a better waiting margin.

This time I was assigned a P100 GPU and trying to run some notebooks it feels like it works really well.


+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.82.01    Driver Version: 470.82.01    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla P100-PCIE...  Off  | 00000000:00:04.0 Off |                    0 |
| N/A   38C    P0    28W / 250W |      0MiB / 16280MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Will not run correctly on Google Colab.

When I run your version of either Automatic1111 or Hlky on Colab, I get the following error when trying to generate an image:

"RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1."

What does With_Prior_Reservation do?

First of all, thank you so much for making this program, and I think it's a miracle that I can use dreambooth so easily

Question is:
I thought When With_Prior_Reservation is true, it would automatically generate a regularization image and use it for training
But even if I set With_Prior_Reservation to False, Generating class images: message is appear and it generate data/SUBJECT_NAME images
I can't understand why it generate class images because I thought class images were not used for training when With_Prior_Reservation is false

I know you have a lot of work, but I would really appreciate it if you could tell me what happens if With_Prior_Reservation is false
Thank you!!

Error in dreambooth colab , last gradio cell errors

Gives me this, and wont work , how to fix this ? Training just ended ,, i have no way to test it now
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/diffusers/configuration_utils.py", line 233, in get_config_dict
revision=revision,
File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/file_download.py", line 1022, in hf_hub_download
cache_dir, repo_folder_name(repo_id=repo_id, repo_type=repo_type)
File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py", line 92, in _inner_fn
validate_repo_id(arg_value)
File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py", line 137, in validate_repo_id
"Repo id must be in the form 'repo_name' or 'namespace/repo_name':"
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/content/gdrive/MyDrive/models/ania'. Use repo_type argument if needed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/content/interface.py", line 7, in
pipeline = StableDiffusionPipeline.from_pretrained('/content/gdrive/MyDrive/models/ania', torch_dtype=torch.float16).to("cuda")
File "/usr/local/lib/python3.7/dist-packages/diffusers/pipeline_utils.py", line 297, in from_pretrained
revision=revision,
File "/usr/local/lib/python3.7/dist-packages/diffusers/configuration_utils.py", line 260, in get_config_dict
f"We couldn't connect to '{HUGGINGFACE_CO_RESOLVE_ENDPOINT}' to load this model, couldn't find it"
OSError: We couldn't connect to 'https://huggingface.co/' to load this model, couldn't find it in the cached files and it looks like /content/gdrive/MyDrive/models/ania is not the path to a directory containing a model_index.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/diffusers/installation#offline-mode'.

Dreambooth start error: Repo id must be in the form 'repo_name' or 'namespace/repo_name'

Hi! I'm getting this error when trying to run "Start DreamBooth" step:

Traceback (most recent call last):
  File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 606, in <module>
    main()
  File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 393, in main
    args.pretrained_model_name_or_path, subfolder="tokenizer", use_auth_token=args.use_auth_token
  File "/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py", line 1748, in from_pretrained
    _commit_hash=commit_hash,
  File "/usr/local/lib/python3.7/dist-packages/transformers/utils/hub.py", line 419, in cached_file
    local_files_only=local_files_only,
  File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/file_download.py", line 1022, in hf_hub_download
    cache_dir, repo_folder_name(repo_id=repo_id, repo_type=repo_type)
  File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py", line 92, in _inner_fn
    validate_repo_id(arg_value)
  File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_validators.py", line 137, in validate_repo_id
    "Repo id must be in the form 'repo_name' or 'namespace/repo_name':"
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/content/gdrive/MyDrive/stable-diffusion-v1-4'. Use `repo_type` argument if needed.
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
    args.func(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
    simple_launcher(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) 

not downloading Huggingface

the code hidde the problem
not accept the terms and dont detect until delete %%capture from code in "Downloading the model"
the log explain really good but hidden, maybe show it if fails

Dreambooth colab : the folder /cont/models/ is not created

Hi, when running the "Start dreambooth cell " we get an error that the folder /content/models/ is not there.
I manually add it and it works but maybe would be smoother to create the folder in the last cells or at the beginning of this cell.
;)

Gradio issue is so annoying

I should rerun the gradio interface every single time I generate something, although it's seems to be done in colab but no results shown in the Gradio, the previous version of the colab was much more amazing in working well , I was able to generate many prompts , and free to use much steps too , I reached 500 steps and it was outstanding, now with this version i can just generate from time to time with less steps less dimensions, and also less number of images, what a worst downgrade, I don't have the perfect pc or components to enjoy SD in general like everbody does, but at least I hope people improve the colabs versions to the best not the worst, not everybody has monsters PC. Thanks TheLastBen for your efforts.

run on v100 machine

i use the colab code to install xformers, but still got
image

image

should i update cuda from 11.4 to 11.7?

Local Host Refuses to connect.

Hello, I'm getting this error regularly when trying to launch the local connection. When I went to the public gradio I was taken to something that I'm pretty sure isn't Stable Diffusion. The translated text says "Convert Kurdish speech to writing".

image

Freezes after generations

Constant img freezes after generations, you have to reload the page every time, generally making the colab unusable. AUTOMATIC1111 doesn't solve this problem at all, hlky has reload buttons which help a lot, but it doesn't have scripts or negative prompts. It would be nice to somehow combine it.
By the way, in the colab from Voldemort, the local port does not help. But it works in this colab https://colab.research.google.com/drive/1KeNq05lji7p-WDS2BL-86Z8Y9SluGng4. Perhaps this will help you in some way to improve colabs. Thanks.

ImportError: cannot import name 'models_path' from 'modules.paths'

Hi there,
First, please allow me to thank you for your work on this project. Much appreciated!

I'm running into an error when trying to run the final cell in the colab for Automatic1111:

/content/gdrive/MyDrive/sd/stable-diffusion
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 9, in
import modules.codeformer_model as codeformer
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/codeformer_model.py", line 8, in
import modules.face_restoration
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/face_restoration.py", line 1, in
from modules import shared
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 13, in
import modules.sd_models
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 11, in
from modules import shared, modelloader
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/modelloader.py", line 9, in
from modules.upscaler import Upscaler
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/upscaler.py", line 13, in
from modules.paths import models_path
ImportError: cannot import name 'models_path' from 'modules.paths' (/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/paths.py)

Excuse my ignorance if this is something I'm doing wrong - this is the first time I've used colab and most of my containerisation experience is just local server/linux-related things in Docker.
Any tips on what I should be troubleshooting?

Kind regards,
Irrational

a simple gradio UI version with just a text box for the prompt

both the notebooks used here , seems to be super complex.
to keep things simple , i was wondering that :
it would be great if there is a way to link 25% faster technique to a simple gradio ui , implemented within the notebook file itself.
with just a text box and submit button.
would be dope if someone could implement it with gradio blocks, such that the model is accessed from a local model path

EOL error on Gradio cell in Dreambooth colab

This is probably something very easy to fix if I knew anything about Python, but whenever I try to run the last cell I get the following error message:

File "/content/interface.py", line 204
path='/content/gdrive/MyDrive/models/modelx",torch_dtype=torch.float16).to("cuda")
^
SyntaxError: EOL while scanning string literal

I tried to play a little with the syntax to see if I could get it to work but I couldn't figure it out

dreambooth xformers installation error

Hi, ran into this during the xformers install cell run:

!pip install triton==2.0.0.dev20220701!wc -l < /content/xformers/setup.py >num

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Usage:
pip3 install [options] [package-index-options] ...
pip3 install [options] -r [package-index-options] ...
pip3 install [options] [-e] ...
pip3 install [options] [-e] ...
pip3 install [options] <archive url/path> ...

no such option: -l

Output text file

Can we get it to generate a textfile with each batch to record the full properties? E.g.
"steps": 40,
"guidance_scale": 7.5,
"init_image": "",
"init_strength": 0,
"num_batch_images": 1,
"prompt": "cat by cartoonist",
"sampler": "klms",
"samples_per_batch": 1,
"seed": 912943576,
"width": 640,
"height": 640

Sometimes gradio webui wont display result even tho it was synthesized cause i see it in notebook

Im not sure wht causes it maybe big sizes and memory leak of some sort ?
I prompt like 20 times with batch 2 and 576x704 on t4 and after awhile images wont display anymore i have to refresh F5 the page to make the thing work again.
Is it fixable?
Also can you let us specify a path to googledrive for all images prompted with web ui ? that would be neat, now im saving by hand and im out of names :D

Feature - tunnel option instead of gradio interface.

Hi,

Gradio.app links sometimes time out and is a bit of a pain. You could add something for ngrok to be used instead

#@title Install ngrok python library
!pip install pyngrok
from pyngrok import ngrok
  # Terminate open tunnels if exist
  ngrok.kill()

  # Setting the authtoken (optional)
  # Get your authtoken from https://dashboard.ngrok.com/auth
  NGROK_AUTH_TOKEN = "2FImIgwy6llwFKC25hW3ZRUCXXH_4gaGZ7sMsR7Tu6E6tDwXE"
  ngrok.set_auth_token(NGROK_AUTH_TOKEN)

  # Open an HTTPs tunnel on port 7860 for http://localhost:7860
  public_url = ngrok.connect(7860, proto="http", options={"bind_tls": True})
  !echo "----------------------------------------"
  !echo "use once web server has initiated"
  !echo "----------------------------------------"
  print("Tracking URL:", public_url)
  !echo "----------------------------------------"
  !python webui.py --precision autocast

I also know that in some place ngrok is blocked by firewalls (offices, colleges etc) so there's a few others. I use bore.

#@title Install Bore Tunnel
!wget https://github.com/ekzhang/bore/releases/download/v0.4.0/bore-v0.4.0-x86_64-unknown-linux-musl.tar.gz
!tar -xf bore-v0.4.0-x86_64-unknown-linux-musl.tar.gz
!rm -f bore-v0.4.0-x86_64-unknown-linux-musl.tar.gz
!cp bore /usr/bin/bore
!rm -rf bore

I guess you could store the binary in gdrive and cp from there.

There's also some others i use, localtunnel, loophole. but you get the idea.

Dreambooth colab: do wwe really need to copy sd1.4 to gdrive?

Hi, I am testing now Dreambooth with colab.

I was wondering if we really need to copy the original sd1.4 model to google drive?
It takes a lot of space on a free google account and does not take so much time to download directly to the colab runtime.

I will test later but now I can't wait to do a first try ;)

Thanks for yourreally good work.

GOOGLE COLLAB WONT WORK!!!!

when training, i will ALWAYS get an error!!! i set it on BOLD

To avoid this warning pass in values for each of the problematic parameters or run accelerate config.
Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 606, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 401, in main
args.pretrained_model_name_or_path, subfolder="vae", use_auth_token=args.use_auth_token
File "/usr/local/lib/python3.7/dist-packages/diffusers/modeling_utils.py", line 312, in from_pretrained
**kwargs,
File "/usr/local/lib/python3.7/dist-packages/diffusers/configuration_utils.py", line 160, in from_config
config_dict = cls.get_config_dict(pretrained_model_name_or_path=pretrained_model_name_or_path, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/diffusers/configuration_utils.py", line 217, in get_config_dict
f"Error no file named {cls.config_name} found in directory {pretrained_model_name_or_path}."
OSError: Error no file named config.json found in directory /content/gdrive/MyDrive/stable-diffusion-v1-4.
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--pretrained_model_name_or_path=/content/gdrive/MyDrive/stable-diffusion-v1-4', '--instance_data_dir=/content/data/eddieman', '--output_dir=/content/models/eddieman', '--instance_prompt=photo of eddieman man', '--seed=12345', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--max_train_steps=800']' returned non-zero exit status 1

Converter from bin to ckpt works!!!!! heres link with code from Josh to incorporate to colab !!!

Developer named Josh did converter code in 2 days, works great i can use ckpt files in webui, does 4.3 gb file in like half minute time
You can paste the code into a cell and then paste your paths to model and ckpt location you want it in , its on bottom of the code.

https://gist.github.com/jachiam/ef621e765c2d88f9dc090ee48f6ced89

Amazing day for SD!!!

It would be nice to automate this in dreambooth notebook after training is done.

My best training so far - 10 images ( 4 body shots , 6 head shots) 1000 steps, no init word, just use class male or female, works best with likeness so far, yeh wrecks other stuff and all guys look like person trained but you can just swap models in automatics webui

CUDA error on AUTOMATIC1111 Colab

It was working fine earlier today, but now when I try to use the AUTOMATIC1111 WEBUI Colab with the Tesla T4 GPU, I get the following error:

RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

It might be related to the changes made to '_C.so' in commit e4bb78c.

Can not run without trainning

sorry for open a new post.
But After finished the train.I dont know which cells to choose to run again that could make the last cell working by skipping the trainning part.
And I dont find how to assign model path for which model to use.

Error in the" Start DreamBooth" in Colab

Hi, first, thanks for your work. :-)

I am having the next error when reaching the "Start DreamBooth" step.
No code was changed, and it's the latest version.

/bin/bash: -c: line 0: syntax error near unexpected token `('
/bin/bash: -c: line 0: `accelerate launch /content/diffusers/examples/dreambooth/train_dreambooth.py    --pretrained_model_name_or_path=/content/gdrive/MyDrive/stable-diffusion-v1-4    --instance_data_dir=/content/data/ewtest04    --output_dir=/content/models/ewtest04    --instance_prompt="photo of ewtest04 building"   --seed=    --resolution=512    --mixed_precision="fp16"    --train_batch_size=1    --gradient_accumulation_steps=1    --use_8bit_adam    --learning_rate=5e-6    --lr_scheduler="constant"    --lr_warmup_steps=0    --max_train_steps=800  print("Almost done ...")'
cp: cannot stat '/content/models/': No such file or directory
Done !

I hope it helps.

Extremely slow

I am using google colab pro with a T4 GPU. Since yesterday, everything feels extremely slow. Even the output says generation only took r.g. 10 seconds the UI doesnt update sometimes for several minutes. I don't see any logs anywhere that would indicate what's happening. Any idea?

RuntimeError: CUDA error: no kernel image is available for execution on the device

When I excuted training cell of dreambooth after installing all requirements, I got the error below. My GPU was Tesla T4.

/usr/local/lib/python3.7/dist-packages/bitsandbytes/cuda_setup/paths.py:99: UserWarning: /usr/lib64-nvidia did not contain libcudart.so as expected! Searching further paths...
f'{candidate_env_vars["LD_LIBRARY_PATH"]} did not contain '
/usr/local/lib/python3.7/dist-packages/bitsandbytes/cuda_setup/paths.py:21: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('"/usr/local/bin/dap_multiplexer","enableLsp"'), PosixPath('{"kernelManagerProxyPort"'), PosixPath('true}'), PosixPath('"172.28.0.3","jupyterArgs"'), PosixPath('6000,"kernelManagerProxyHost"'), PosixPath('["--ip=172.28.0.2"],"debugAdapterMultiplexerPath"')}
"WARNING: The following directories listed in your path were found to "
/usr/local/lib/python3.7/dist-packages/bitsandbytes/cuda_setup/paths.py:21: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('module'), PosixPath('//ipykernel.pylab.backend_inline')}
"WARNING: The following directories listed in your path were found to "
/usr/local/lib/python3.7/dist-packages/bitsandbytes/cuda_setup/paths.py:21: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('/env/python')}
"WARNING: The following directories listed in your path were found to "
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching /usr/local/cuda/lib64...
CUDA SETUP: CUDA runtime path found: /usr/local/cuda/lib64/libcudart.so
CUDA SETUP: Highest compute capability among GPUs detected: 7.5
CUDA SETUP: Detected CUDA version 111
CUDA SETUP: Loading binary /usr/local/lib/python3.7/dist-packages/bitsandbytes/libbitsandbytes_cuda111.so...
Steps: 0% 0/2500 [00:00<?, ?it/s]Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 606, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 550, in main
noise_pred = unet(noisy_latents, timesteps, encoder_hidden_states).sample
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/accelerate/utils/operations.py", line 507, in call
return convert_to_fp32(self.model_forward(*args, **kwargs))
File "/usr/local/lib/python3.7/dist-packages/torch/amp/autocast_mode.py", line 12, in decorate_autocast
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/diffusers/models/unet_2d_condition.py", line 254, in forward
encoder_hidden_states=encoder_hidden_states,
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/diffusers/models/unet_blocks.py", line 565, in forward
hidden_states = attn(hidden_states, context=encoder_hidden_states)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/diffusers/models/attention.py", line 167, in forward
hidden_states = block(hidden_states, context=context)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/diffusers/models/attention.py", line 217, in forward
hidden_states = self.attn1(self.norm1(hidden_states)) + hidden_states
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/diffusers/models/attention.py", line 287, in forward
out = xformers.ops.memory_efficient_attention(q, k, v, attn_bias=None, op=self.attention_op)
File "/usr/local/lib/python3.7/dist-packages/xformers/ops.py", line 626, in memory_efficient_attention
return op.apply(query, key, value, attn_bias, p)
File "/usr/local/lib/python3.7/dist-packages/xformers/ops.py", line 264, in forward
causal=causal,
File "/usr/local/lib/python3.7/dist-packages/torch/_ops.py", line 143, in call
return self._op(*args, **kwargs or {})
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Steps: 0% 0/2500 [00:10<?, ?it/s]
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--pretrained_model_name_or_path=/content/gdrive/MyDrive/stable-diffusion-v1-4', '--instance_data_dir=/content/data/sksBJ', '--output_dir=/content/models/sksBJ', '--instance_prompt=sksBJ man', '--seed=12345', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=5e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--max_train_steps=2500']' returned non-zero exit status 1.

Other gpu support

Hello, from the notebook I can see that pre-compiled are available only for T4, P100 and V100 gpus:

s = getoutput('nvidia-smi')
if 'T4' in s:
  gpu = 'T4'
elif 'P100' in s:
  gpu = 'P100'
elif 'V100' in s:
  gpu = 'V100'

What. about other gpu like K80?
Thanks.

It gives me an error when executing the xformers installation in google colab

When executing the cell "Patching setup.py" I get that it can't find the file /content/xformers/setup.py

The error is the following:

Writing /content/xformers/setup.py
---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[<ipython-input-10-91ff3c53b74d>](https://localhost:8080/#) in <module>
----> 1 get_ipython().run_cell_magic('writefile', '/content/xformers/setup.py', '#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.\n#\n# This source code is licensed under the BSD license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport distutils.command.clean\nimport glob\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\nfrom pathlib import Path\n\nimport setuptools\nimport torch\nfrom torch.utils.cpp_extension import (\n    CUDA_HOME,\n    BuildExtension,\n    CppExtension,\n    CUDAExtension,\n)\n\nthis_dir = os.path.dirname(os.path.abspath(__file__))\n\n\ndef fetch_requirements():\n    with open("requirements.txt") as f:\n        reqs = f.read().strip().split("\\n")\n    return reqs\n\n\n# [https://packaging.python.org/guides/single-sourcing-package-version/\ndef](https://packaging.python.org/guides/single-sourcing-package-version//ndef) find_version(version_file_path):\n    with open(version_file_path) as version_file:\n        version_match = re.search(\n            r"^__version__ = [\'\\"]([^\'\\"]*)[\'\\"]", version_file.read(), re.M\n        )\n        # The following is used to build release packages.\n        # Users should never use it.\n        suffix = os.getenv("XFORMERS_VERSION_SUFFIX", "")\n        if version_match:\n            return version_match.group(1) + suffix\n        raise RuntimeError("Unable to find ...

2 frames
<decorator-gen-98> in writefile(self, line, cell)

[/usr/local/lib/python3.7/dist-packages/IPython/core/magics/osm.py](https://localhost:8080/#) in writefile(self, line, cell)
    846 
    847         mode = 'a' if args.append else 'w'
--> 848         with io.open(filename, mode, encoding='utf-8') as f:
    849             f.write(cell)

FileNotFoundError: [Errno 2] No such file or directory: '/content/xformers/setup.py'

Can't get "Test the model in one click" to run with "With_Prior_Preservation" ckpt

I was able to run this colab before, but when I tried "With_Prior_Preservation" training (43 instance images, 217 Optional class images) I generated a ckpt with "Start DreamBooth", but cannot seem to get it to run.
Trying to run it from the drive location
image
I get the following error:
image
Copying the ckpt into colab, I instead get:
image

What am I doing wrong? Note: I did put in the Huggingface token and have accepted the conditions.

require load from gdisk path directly

I think everytime Upload pictures of the class would cost unnecessary caculating time on colab.
Can you made a way to load these on gdisk so that we can upload them first.

Can we get KLMS sampler?

I've only used KLMS since I got access to colabs. With these older samplers, I don't get nearly the same quality of output from my prompts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.