summaryrefslogtreecommitdiffstats
path: root/pipelines
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-09-26 16:36:42 +0200
committerVolpeon <git@volpeon.ink>2022-09-26 16:36:42 +0200
commit5588b93859c4380082a7e46bf5bef2119ec1907a (patch)
tree05a8292201912eb6f417eb2740c86df2153d1095 /pipelines
downloadtextual-inversion-diff-5588b93859c4380082a7e46bf5bef2119ec1907a.tar.gz
textual-inversion-diff-5588b93859c4380082a7e46bf5bef2119ec1907a.tar.bz2
textual-inversion-diff-5588b93859c4380082a7e46bf5bef2119ec1907a.zip
Init
Diffstat (limited to 'pipelines')
-rw-r--r--pipelines/stable_diffusion/no_check.py13
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 @@
1from diffusers import ModelMixin
2import torch
3
4
5class 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]