Spaces:
Runtime error
Runtime error
AdamOswald1
commited on
Commit
•
dcc898f
1
Parent(s):
5e53dc2
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ if is_colab:
|
|
78 |
current_model.path,
|
79 |
torch_dtype=torch.float16,
|
80 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
81 |
-
safety_checker=
|
82 |
)
|
83 |
|
84 |
else:
|
@@ -167,7 +167,7 @@ def txt_to_img(model_path, prompt, n_images, neg_prompt, guidance, steps, width,
|
|
167 |
current_model_path,
|
168 |
torch_dtype=torch.float16,
|
169 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
170 |
-
safety_checker=
|
171 |
)
|
172 |
else:
|
173 |
pipe = StableDiffusionPipeline.from_pretrained(
|
@@ -216,7 +216,7 @@ def img_to_img(model_path, prompt, n_images, neg_prompt, img, strength, guidance
|
|
216 |
current_model_path,
|
217 |
torch_dtype=torch.float16,
|
218 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
219 |
-
safety_checker=
|
220 |
)
|
221 |
else:
|
222 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|
|
|
78 |
current_model.path,
|
79 |
torch_dtype=torch.float16,
|
80 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
81 |
+
safety_checker=lambda images, clip_input: (images, False)
|
82 |
)
|
83 |
|
84 |
else:
|
|
|
167 |
current_model_path,
|
168 |
torch_dtype=torch.float16,
|
169 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
170 |
+
safety_checker=lambda images, clip_input: (images, False)
|
171 |
)
|
172 |
else:
|
173 |
pipe = StableDiffusionPipeline.from_pretrained(
|
|
|
216 |
current_model_path,
|
217 |
torch_dtype=torch.float16,
|
218 |
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler"),
|
219 |
+
safety_checker=lambda images, clip_input: (images, False)
|
220 |
)
|
221 |
else:
|
222 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
|