Commit d7e64795 authored by kurumuz's avatar kurumuz

fix bug

parent 17706785
......@@ -350,6 +350,9 @@ class StableDiffusionModel(nn.Module):
torch.seed()
np.random.seed()
#set hypernetwork to none after generation
CrossAttention.set_hypernetwork(None)
return images
@torch.no_grad()
......
......@@ -104,7 +104,7 @@ def sanitize_stable_diffusion(request, config):
random.setstate(state)
if request.module is not None:
if request.module not in config.model.premodules:
if request.module not in config.model.premodules or request.module != "vanilla":
return False, "module should be one of: " + ", ".join(config.model.premodules)
if request.image is not None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment