summaryrefslogtreecommitdiffstats
path: root/pipelines/stable_diffusion/no_check.py
blob: 06c2f72db350438ecf2c077cb59432acf9a74e79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
from diffusers import ModelMixin
import torch


class NoCheck(ModelMixin):
    """Can be used in place of safety checker. Use responsibly and at your own risk."""

    def __init__(self):
        super().__init__()
        self.register_parameter(name='asdf', param=torch.nn.Parameter(torch.randn(3)))

    def forward(self, images=None, **kwargs):
        return images, [False]