stable-diffusion-webui/scripts/pipelines/stable_diffusion/no_check.py
hlky 8b4464a706
Add periodic checkpointing
Update diffusers_textual_inversion_2.py
2022-09-23 15:29:08 +01:00

12 lines
378 B
Python

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]