-
Notifications
You must be signed in to change notification settings - Fork 330
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
Fix Incorrect Default Parameters in NoiseScheduler for StableDiffusion #2065
base: master
Are you sure you want to change the base?
Fix Incorrect Default Parameters in NoiseScheduler for StableDiffusion #2065
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Thank you @yuvraj-wale! Have you tested our API with these new parameters? Do you see any impact on image generation? You can try this notebook gist. By the way, we will need to update our "golden value" SD test with this change (link). I recommend running the following command in your branch to verify: pytest keras_cv/models/stable_diffusion --run_extra_large |
This won't change our golden values, because the NoiseScheduler is only relevant for training, not the forward pass. |
Thanks for the clarification @ianstenbit |
@yuvraj-wale have you tested with a fine tuning workflow like Textual inversion? - #2065 (comment) here is the link to it - https://keras.io/examples/generative/fine_tune_via_textual_inversion/ |
@yuvraj-wale can you please rebase the branch with master? and check if the golden values still remain the same? |
We need to cut a release to get the namex fixes deployed.
Need to cut another minor release for bugfix.
…s-team#2071) * Update deeplab_v3_plus.py Update the comment of the `num_classes`parameter which contains the background class and the classes from the data. * Update deeplab_v3_plus_test.py Update the tests following the updating of 'num_classes' parameter (now including the background class)
Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
* Start adding components for the segment anything model * SAMLayerNormalization -> keras.layers.LayerNormalization They both behave exactly the same when moving_mean and moving_variance are None and epsilon is 1e-6 * Move the image encoder to detectron2 backbone and fix for tf.keras backend * Address review comments and address saving bug - Use `keras_cv.export_api.keras_cv_export` instead of `keras.saving.register_keras_serializable`. - Add a `SerializableSequential` class to address the saving bug with the `Sequential` model. - Push the helper functions in `keras_cv/layers/detectron2_layers.py` to the bottom of the file. - Add the detectron2 layers to the `keras_cv/layers/__init__.py` file. - Add a test for the `ViTDetPatchingAndEmbedding` layer. * Make the backbone functional; unite MLP and MLPBlock * Address David's review comments * Add SAM Task model; make MaskDecoder and PromptEncoder XLA compatible * Remove a stray file * Add docs for the Task model * Add more references [skip ci] * Remove SerializableSequential layer * detectron2 -> vit_det; add SAM presets; fix ViTDet presets * Increse test tolerence for GCB Run
* Export SD submodels * Remove empty folder
* adding deeplab_v3_plus_presets * update formatting * fixed error * reformatted * fix errors * added num_classses arg * add input_shape arg * update test * update input_shape * updated preset * update test * move update to from_preset to task.py * reformatted code * updated doc string * Update assert * Update deeplab_v3_plus_test.py test * Update task.py * Update deeplab_v3_plus_test.py * Update deeplab_v3_plus_test.py
* fix example in docstring * review comments
* Bump python version requirement to 3.9 Keras-core now requires at least 3.9, and tf 2.14 (out imminently) will require 3.9 as well. We should follow suit for cv/nlp. * Fix build errors with new keras-core version * Update devcontainer to 3.9
* Use "masks" and "boxes" as prompt keys for SAM * Fix tests
* Use "masks" and "boxes" as prompt keys for SAM * Fix tests * Support missing prompts for SAM * Update docstrings * Review fix * Fix partial prompting for top-level model
…eam#2001 (keras-team#2077) * Test to demonstrate failures in import * Explicitly specify full package for more modules, as shown in keras-team#2001
* Update VITDet to conform to KerasCV scaling standards * dtype fix
…team#2093) * Export task models as both models.task.Model and models.Model * Same for ImageClassifier
* Add fixes for backwards compatibility for versions <2.15 * Bump version number for presets to version 2 * Port over RetinaNet custom metric fix * Bump DeepLabV3Plus preset version after re-upload
* Modify kaggle handles to full path * Modify preset handling * Fix formatting
* Fix YOLOv8Detector deserialization * Fix nit * Deserialize preditction decoder
Bumps the python group with 4 updates: [tf-nightly-cpu](https://github.com/tensorflow/tensorflow), torch, torchvision and [tf-nightly[and-cuda]](https://github.com/tensorflow/tensorflow). Updates `tf-nightly-cpu` from 2.16.0.dev20231221 to 2.16.0.dev20240104 - [Release notes](https://github.com/tensorflow/tensorflow/releases) - [Changelog](https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md) - [Commits](https://github.com/tensorflow/tensorflow/commits) Updates `torch` from 2.1.2 to 2.1.2+cu121 Updates `torchvision` from 0.16.2 to 0.16.2+cu121 Updates `tf-nightly[and-cuda]` from 2.16.0.dev20231221 to 2.16.0.dev20240104 - [Release notes](https://github.com/tensorflow/tensorflow/releases) - [Changelog](https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md) - [Commits](https://github.com/tensorflow/tensorflow/commits) --- updated-dependencies: - dependency-name: tf-nightly-cpu dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python - dependency-name: torch dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python - dependency-name: torchvision dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python - dependency-name: tf-nightly[and-cuda] dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Pedro Kaj Kjellerup Nacht <[email protected]>
* fix nms serialization * remove the default function --------- Co-authored-by: Divyashree Sreepathihalli <divyashreepathihalli>
Co-authored-by: Divyashree Sreepathihalli <divyashreepathihalli>
Keras, KerasNLP and KerasTuner all store things liek the CONTRIBUTING.md in the toplevel of the repo. We should do the same here.
* Unify `version` API with keras and keras_nlp * Formatting * Update to keep `version` parity with KerasNLP, support nightly version string * Update version_utils.py * Update version_utils.py
* Update random_crop_and_zoom.py * Update description * rename file
* BASNet model initial code structure * adding test and initial preset details * adding comments * cleaning and formatting code * keras 3 support added * disabling preset test for BASNet
Fixed image.shape issue for tensorflow backend
…eras-team#2313) * Create auto-assignment.yaml * Create auto-assignment.js * Create stale-issue-pr.yaml * Rename auto-assignment.yaml to auto-assignment.yml * Rename stale-issue-pr.yaml to stale-issue-pr.yml
Bumps the github-actions group with 3 updates: [actions/cache](https://github.com/actions/cache), [actions/upload-artifact](https://github.com/actions/upload-artifact) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v3...v4) Updates `actions/upload-artifact` from 4.0.0 to 4.3.0 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@c7d193f...26f96df) Updates `github/codeql-action` from 3.22.12 to 3.23.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@012739e...b7bf0a3) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
What does this PR do?
Fixes #2049
Before submitting
Pull Request section?
to it if that's the case
--> NoiseScheduler parameters for StableDiffusion are wrong #2049
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.