Comments (15)
jax.random.KeyArray was removed in JAX v0.4.24. current diffusers only work with JAX v0.4.23 or earlier.
add under requirements:
!pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
from fast-stable-diffusion.
Getting similar error, while loading session.
1.5 Detected
Session found, loading the trained model ...
Traceback (most recent call last):
File "/content/diffusers/scripts/convert_original_stable_diffusion_to_diffusers.py", line 19, in
from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt
File "/usr/local/lib/python3.10/dist-packages/diffusers/init.py", line 27, in
from .pipelines import OnnxRuntimeModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/init.py", line 18, in
from .dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/init.py", line 1, in
from .pipeline_dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py", line 21, in
from ..pipeline_utils import AudioPipelineOutput, DiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py", line 39, in
from ..models.modeling_utils import _LOW_CPU_MEM_USAGE_DEFAULT
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/init.py", line 31, in
from .unet_2d_condition_flax import FlaxUNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/unet_2d_condition_flax.py", line 25, in
from .modeling_flax_utils import FlaxModelMixin
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 45, in
class FlaxModelMixin:
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 192, in FlaxModelMixin
def init_weights(self, rng: jax.random.KeyArray) -> Dict:
File "/usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py", line 54, in getattr
raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.random' has no attribute 'KeyArray'
Conversion error, if the error persists, remove the CKPT file from the current session folder
from fast-stable-diffusion.
Same problem, did anyone solve it?
from fast-stable-diffusion.
Same problem here, problem with jax
from fast-stable-diffusion.
Also seeing the same. AttributeError: module 'jax.random' has no attribute 'KeyArray'
from fast-stable-diffusion.
Same problem here.
from fast-stable-diffusion.
Same problem here! :(
Training the UNet...
Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 18, in
from diffusers import AutoencoderKL, DDPMScheduler, StableDiffusionPipeline, UNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/init.py", line 27, in
from .pipelines import OnnxRuntimeModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/init.py", line 18, in
from .dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/init.py", line 1, in
from .pipeline_dance_diffusion import DanceDiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/dance_diffusion/pipeline_dance_diffusion.py", line 21, in
from ..pipeline_utils import AudioPipelineOutput, DiffusionPipeline
File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py", line 39, in
from ..models.modeling_utils import _LOW_CPU_MEM_USAGE_DEFAULT
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/init.py", line 31, in
from .unet_2d_condition_flax import FlaxUNet2DConditionModel
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/unet_2d_condition_flax.py", line 25, in
from .modeling_flax_utils import FlaxModelMixin
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 45, in
class FlaxModelMixin:
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_flax_utils.py", line 192, in FlaxModelMixin
def init_weights(self, rng: jax.random.KeyArray) -> Dict:
File "/usr/local/lib/python3.10/dist-packages/jax/_src/deprecations.py", line 54, in getattr
raise AttributeError(f"module {module!r} has no attribute {name!r}")
AttributeError: module 'jax.random' has no attribute 'KeyArray'
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/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', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/fkvnd-pro2', '--pretrained_model_name_or_path=/content/stable-diffusion-v2-512', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/fkvnd-pro2/instance_images', '--output_dir=/content/models/fkvnd-pro2', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/fkvnd-pro2/captions', '--instance_prompt=', '--seed=71560', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1500']' returned non-zero exit status 1.
Something went wrong
from fast-stable-diffusion.
Can someone please help me with where specifically I need to put !pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html I am very new to all this, muddled my way through the colab workbook hit the error and came here. Thank you in advance!
You have to click "show code" in the dependencies cell.
Then you just paste it under the "!pip install gradio..."
That made it work for me :)
from fast-stable-diffusion.
Ditto
from fast-stable-diffusion.
jax.random.KeyArray was removed in JAX v0.4.24. current diffusers only work with JAX v0.4.23 or earlier.
add under requirements:
!pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
Worked like a charm. Thank you
from fast-stable-diffusion.
Can someone please help me with where specifically I need to put !pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html I am very new to all this, muddled my way through the colab workbook hit the error and came here. Thank you in advance!
from fast-stable-diffusion.
Can someone please help me with where specifically I need to put !pip install "jax[cuda12_pip]==0.4.23" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html I am very new to all this, muddled my way through the colab workbook hit the error and came here. Thank you in advance!
You have to click "show code" in the dependencies cell. Then you just paste it under the "!pip install gradio..."
That made it work for me :)
Legend thank you will try it now :D Edit - works a treat!
from fast-stable-diffusion.
Yeah, just started having this problem. DjNastyMagic fix worked.
from fast-stable-diffusion.
I applied fix by DJNastyMagic.
But have now this error:
Training the UNet...
Traceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 512, in main
vae = AutoencoderKL.from_pretrained(args.pretrained_model_name_or_path, subfolder="vae")
File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 558, in from_pretrained
raise ValueError(
ValueError: Cannot load <class 'diffusers.models.autoencoder_kl.AutoencoderKL'> from /content/stable-diffusion-custom because the following keys are missing:
decoder.mid_block.attentions.0.key.bias, encoder.mid_block.attentions.0.value.weight, decoder.mid_block.attentions.0.proj_attn.bias, decoder.mid_block.attentions.0.value.bias, decoder.mid_block.attentions.0.query.bias, decoder.mid_block.attentions.0.query.weight, encoder.mid_block.attentions.0.proj_attn.bias, encoder.mid_block.attentions.0.query.weight, encoder.mid_block.attentions.0.key.weight, encoder.mid_block.attentions.0.value.bias, decoder.mid_block.attentions.0.proj_attn.weight, encoder.mid_block.attentions.0.query.bias, decoder.mid_block.attentions.0.value.weight, encoder.mid_block.attentions.0.proj_attn.weight, encoder.mid_block.attentions.0.key.bias, decoder.mid_block.attentions.0.key.weight.
Please make sure to pass low_cpu_mem_usage=False
and device_map=None
if you want to randomely initialize those weights or else make sure your checkpoint file is correct.
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/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', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Mysession', '--pretrained_model_name_or_path=/content/stable-diffusion-custom', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Mysession/instance_images', '--output_dir=/content/models/Mysession', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/Mysession/captions', '--instance_prompt=', '--seed=601321', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1800']' returned non-zero exit status 1.
Something went wrong
from fast-stable-diffusion.
ERROR INSTALLING CUDA
aceback (most recent call last):
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 803, in
main()
File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 535, in main
import bitsandbytes as bnb
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/init.py", line 6, in
from .autograd._functions import (
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/autograd/_functions.py", line 5, in
import bitsandbytes.functional as F
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/functional.py", line 13, in
from .cextension import COMPILED_WITH_CUDA, lib
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py", line 41, in
lib = CUDALibrary_Singleton.get_instance().lib
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py", line 37, in get_instance
cls._instance.initialize()
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes/cextension.py", line 27, in initialize
raise Exception('CUDA SETUP: Setup Failed!')
Exception: CUDA SETUP: Setup Failed!
Traceback (most recent call last):
File "/usr/local/bin/accelerate", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
simple_launcher(args)
File "/usr/local/lib/python3.10/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', '--image_captions_filename', '--train_only_unet', '--save_starting_step=500', '--save_n_steps=0', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/bEBA', '--pretrained_model_name_or_path=/content/stable-diffusion-v1-5', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/bEBA/instance_images', '--output_dir=/content/models/bEBA', '--captions_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/bEBA/captions', '--instance_prompt=', '--seed=247601', '--resolution=768', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--use_8bit_adam', '--learning_rate=2e-06', '--lr_scheduler=linear', '--lr_warmup_steps=0', '--max_train_steps=1500']' returned non-zero exit status 1.
Something went wrong
from fast-stable-diffusion.
Related Issues (20)
- Unable to launch ComfyUI in Paperspace, tensorboard link "Service Unavailable" HOT 5
- Google collab is not working for more than 3 months already - What's the point then?
- Could not create share link. Missing file: /usr/local/lib/python3.10/dist-packages/gradio/frpc_linux_amd64_v0.2.
- gradio link not showing up HOT 1
- faststablediffusion
- FileNotFoundError [Paperspace] HOT 16
- GOOGLE COLLAB works well for 2 days, then breaks. Why? HOT 4
- Something went wrong
- HOW TO USE MODEL FROM SDXL in TheLastBen Stable Diffusion? HOT 3
- Error merging checkpoints: Error while serializing: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
- Problem using SDXL model on colab HOT 1
- RunPod / RNPD-A1111 not able to start
- Official Runpod model does not work: runpod/stable-diffusion:fast-stable-diffusion-2.4.0
- (Fix Guide) Paperspace Python3.9 is missing HOT 12
- Xformers Google Colab ERROR HOT 16
- Inpaint Issue
- Automatic 1111 notebook doesn't work HOT 3
- Paperspace - A1111 - Error HOT 3
- Automatic 1111 is not working at all
- Stuck on controlnet cell
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast-stable-diffusion.