Spaces:
Running
Running
Update app.py
Browse filesRemoving Censor
app.py
CHANGED
@@ -6,7 +6,7 @@ from diffusers import StableDiffusionInstructPix2PixPipeline
|
|
6 |
|
7 |
model_id = "timbrooks/instruct-pix2pix"
|
8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
-
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16") if torch.cuda.is_available() else StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id)
|
10 |
pipe = pipe.to(device)
|
11 |
|
12 |
def resize(value,img):
|
|
|
6 |
|
7 |
model_id = "timbrooks/instruct-pix2pix"
|
8 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
9 |
+
pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16", safety_checker=None) if torch.cuda.is_available() else StableDiffusionInstructPix2PixPipeline.from_pretrained(model_id, safety_checker=None)
|
10 |
pipe = pipe.to(device)
|
11 |
|
12 |
def resize(value,img):
|