Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ from PIL import Image
|
|
7 |
from diffusers import StableDiffusionImg2ImgPipeline
|
8 |
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
-
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-
|
11 |
pipe = pipe.to(device)
|
12 |
|
13 |
def resize(value,img):
|
|
|
7 |
from diffusers import StableDiffusionImg2ImgPipeline
|
8 |
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
+
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", safety_checker=None)
|
11 |
pipe = pipe.to(device)
|
12 |
|
13 |
def resize(value,img):
|