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

TypeError while training theStable diffusion model. #2115

Closed
sayannath opened this issue Oct 24, 2023 · 4 comments
Closed

TypeError while training theStable diffusion model. #2115

sayannath opened this issue Oct 24, 2023 · 4 comments
Labels
type:Bug Something isn't working

Comments

@sayannath
Copy link

Working on Fine-tuning Stable Diffusion

Current Behavior:

epochs = 1
ckpt_path = "finetuned_stable_diffusion.h5"
ckpt_callback = tf.keras.callbacks.ModelCheckpoint(
    ckpt_path,
    save_weights_only=True,
    monitor="loss",
    mode="min",
)
diffusion_ft_trainer.fit(training_dataset, epochs=epochs, callbacks=[ckpt_callback])
print(training_dataset)
<_PrefetchDataset element_spec={'images': TensorSpec(shape=(None, 256, 256, 3), dtype=tf.float32, name=None), 'tokens': TensorSpec(shape=(None, 77), dtype=tf.float64, name=None), 'encoded_text': TensorSpec(shape=(None, 77, 768), dtype=tf.float32, name=None)}>

Error:
Screenshot 2023-10-23 at 8 32 44 PM

@sayannath sayannath added the type:Bug Something isn't working label Oct 24, 2023
@sayannath sayannath changed the title TypeError while training theStable diffusion model. TypeError while training theStable diffusion model. Oct 24, 2023
@divyashreepathihalli
Copy link
Collaborator

@sayannath are you facing this error while running the example colab as is without making any changes?
Tagging the authors of this example - @sayakpaul could you please take a look?

@sayakpaul
Copy link
Contributor

I think it might be because of the version changes. I would suggest checking the versions around the time this tutorial was published and seeing if that works.

@sayannath
Copy link
Author

I think it might be because of the version changes. I would suggest checking the versions around the time this tutorial was published and seeing if that works.

Yes, I have tried using that exact version but it was throwing errors while importing the ClipTokenizer and the other modules.

Here is the issue I created. Link
The solution Keras team provided. Link

@divyashreepathihalli
Copy link
Collaborator

@sayannath this should be fixed now, can you check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants