Nerogar / OneTrainer

OneTrainer is a one-stop solution for all your stable diffusion training needs.
GNU Affero General Public License v3.0
1.34k stars 110 forks source link

[Bug]: unexpected difference between latent image and latent conditioning image #363

Open seniorsolt opened 4 days ago

seniorsolt commented 4 days ago

What happened?

I'm training finetune inpaint stable diffusion 1.5 with masking. Без названия

I think it's because there are two different modes for latent in SampleVAEDistribution.py from mgds:

def get_item(self, variation: int, index: int, requested_name: str = None) -> dict:
    distribution = self._get_previous_item(variation, self.in_name, index)

    if self.mode == 'sample':
        latent = distribution.sample()
    elif self.mode == 'mean':
        latent = distribution.mode()
    else:
        raise Exception('method not supported')

2024-06-26_21-17-16

What did you expect would happen?

I expect to see difference between latent image and latent conditioning image only within masked area.

Relevant log output

No response

Output of pip freeze

No response