Spaces:
Build error
Build error
AdamOswald1
commited on
Commit
•
b847401
1
Parent(s):
95dc412
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ if is_colab:
|
|
61 |
current_model.path,
|
62 |
torch_dtype=torch.float16,
|
63 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
64 |
-
safety_checker=
|
65 |
)
|
66 |
|
67 |
else:
|
@@ -150,7 +150,7 @@ def txt_to_img(model_path, prompt, n_images, neg_prompt, guidance, steps, width,
|
|
150 |
current_model_path,
|
151 |
torch_dtype=torch.float16,
|
152 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
153 |
-
safety_checker=
|
154 |
)
|
155 |
else:
|
156 |
pipe = StableDiffusionPipeline.from_pretrained(
|
@@ -199,7 +199,7 @@ def img_to_img(model_path, prompt, n_images, neg_prompt, img, strength, guidance
|
|
199 |
current_model_path,
|
200 |
torch_dtype=torch.float16,
|
201 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
202 |
-
safety_checker=
|
203 |
)
|
204 |
else:
|
205 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
|
|
61 |
current_model.path,
|
62 |
torch_dtype=torch.float16,
|
63 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
64 |
+
safety_checker=lambda images, clip_input: (images, False)
|
65 |
)
|
66 |
|
67 |
else:
|
|
|
150 |
current_model_path,
|
151 |
torch_dtype=torch.float16,
|
152 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
153 |
+
safety_checker=lambda images, clip_input: (images, False)
|
154 |
)
|
155 |
else:
|
156 |
pipe = StableDiffusionPipeline.from_pretrained(
|
|
|
199 |
current_model_path,
|
200 |
torch_dtype=torch.float16,
|
201 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
202 |
+
safety_checker=lambda images, clip_input: (images, False)
|
203 |
)
|
204 |
else:
|
205 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|