diff options
author | Volpeon <git@volpeon.ink> | 2022-09-26 16:36:42 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-09-26 16:36:42 +0200 |
commit | 5588b93859c4380082a7e46bf5bef2119ec1907a (patch) | |
tree | 05a8292201912eb6f417eb2740c86df2153d1095 /pipelines/stable_diffusion | |
download | textual-inversion-diff-5588b93859c4380082a7e46bf5bef2119ec1907a.tar.gz textual-inversion-diff-5588b93859c4380082a7e46bf5bef2119ec1907a.tar.bz2 textual-inversion-diff-5588b93859c4380082a7e46bf5bef2119ec1907a.zip |
Init
Diffstat (limited to 'pipelines/stable_diffusion')
-rw-r--r-- | pipelines/stable_diffusion/no_check.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pipelines/stable_diffusion/no_check.py b/pipelines/stable_diffusion/no_check.py new file mode 100644 index 0000000..06c2f72 --- /dev/null +++ b/pipelines/stable_diffusion/no_check.py | |||
@@ -0,0 +1,13 @@ | |||
1 | from diffusers import ModelMixin | ||
2 | import torch | ||
3 | |||
4 | |||
5 | class NoCheck(ModelMixin): | ||
6 | """Can be used in place of safety checker. Use responsibly and at your own risk.""" | ||
7 | |||
8 | def __init__(self): | ||
9 | super().__init__() | ||
10 | self.register_parameter(name='asdf', param=torch.nn.Parameter(torch.randn(3))) | ||
11 | |||
12 | def forward(self, images=None, **kwargs): | ||
13 | return images, [False] | ||