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

A suggestion about palette. #1150

Closed
jbwang1997 opened this issue Dec 18, 2021 · 2 comments
Closed

A suggestion about palette. #1150

jbwang1997 opened this issue Dec 18, 2021 · 2 comments

Comments

@jbwang1997
Copy link
Contributor

When I read the implementation of the palette function, I find a personal dataset with CLASSES defined but PALETTE being None will skip generating a random palette because the get_classes_and_palette returns at

if classes is None:
self.custom_classes = False
return self.CLASSES, self.PALETTE

The get_palette_for_custom_classes which containing random palette generation will not execute.

As a result, a random palette will be generated in each iteration of testing at

if palette is None:
if self.PALETTE is None:
palette = np.random.randint(
0, 255, size=(len(self.CLASSES), 3))
else:
palette = self.PALETTE
palette = np.array(palette)

The colors of classes are different in each iteration.

@Lsz-20
Copy link

Lsz-20 commented Dec 19, 2021

maybe the same question~
when I test and visual my dataset,the picture has been paint in random color,and I have checked the categories which load from checkpoints it seems work well

@MengzhangLI
Copy link
Contributor

#1152

@MengzhangLI MengzhangLI reopened this Mar 8, 2022
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this issue Mar 27, 2023
…n-mmlab#1150)

* StableDiffusion: Decode latents separately to run larger batches

* Move VAE sliced decode under enable_vae_sliced_decode and vae.enable_sliced_decode

* Rename sliced_decode to slicing

* fix whitespace

* fix quality check and repository consistency

* VAE slicing tests and documentation

* API doc hooks for VAE slicing

* reformat vae slicing tests

* Skip VAE slicing for one-image batches

* Documentation tweaks for VAE slicing

Co-authored-by: Ilmari Heikkinen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants