-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[Bug Fix] Fix TTA resize scale #334
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
@@ -157,7 +157,7 @@ def _random_scale(self, results): | |||
if self.ratio_range is not None: | |||
if self.img_scale is None: | |||
scale, scale_idx = self.random_sample_ratio( | |||
results['img'].shape[:2], self.ratio_range) | |||
results['img'].shape[:2:-1], self.ratio_range) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
results['img'].shape[:2:-1], self.ratio_range) | |
h, w = results['img'].shape[:2] | |
(w, h), self.ratio_range) |
is more intuitive.
Codecov Report
@@ Coverage Diff @@
## master #334 +/- ##
=======================================
Coverage 86.47% 86.47%
=======================================
Files 95 95
Lines 4761 4762 +1
Branches 765 765
=======================================
+ Hits 4117 4118 +1
Misses 499 499
Partials 145 145
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* fix tta bug * modify as suggested * fix test_tta bug
…return tuples (open-mmlab#334) * add outputs for models * add for pipelines * finish schedulers * better naming * adapt tests as well * replace dict access with . access * make schedulers works * finish * correct readme * make bcp compatible * up * small fix * finish * more fixes * more fixes * Apply suggestions from code review Co-authored-by: Suraj Patil <surajp815@gmail.com> Co-authored-by: Pedro Cuenca <pedro@huggingface.co> * Update src/diffusers/models/vae.py Co-authored-by: Pedro Cuenca <pedro@huggingface.co> * Adapt model outputs * Apply more suggestions * finish examples * correct Co-authored-by: Suraj Patil <surajp815@gmail.com> Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
No description provided.