Update app.py
Browse files
app.py
CHANGED
|
@@ -21,6 +21,7 @@ device="cpu"
|
|
| 21 |
#prompt_pipe.to(device)
|
| 22 |
|
| 23 |
img_pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_auth_token=YOUR_TOKEN)
|
|
|
|
| 24 |
img_pipe.to(device)
|
| 25 |
|
| 26 |
source_img = gr.Image(source="upload", type="filepath", label="init_img | 512*512 px")
|
|
|
|
| 21 |
#prompt_pipe.to(device)
|
| 22 |
|
| 23 |
img_pipe = StableDiffusionImg2ImgPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", use_auth_token=YOUR_TOKEN)
|
| 24 |
+
img_pipe.safety_checker = lambda images, clip_input: (images, False)
|
| 25 |
img_pipe.to(device)
|
| 26 |
|
| 27 |
source_img = gr.Image(source="upload", type="filepath", label="init_img | 512*512 px")
|