Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ import os
|
|
10 |
login(token=os.environ.get('HF_KEY'))
|
11 |
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
-
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16
|
14 |
pipe = pipe.to(device)
|
15 |
|
16 |
def resize(value,img):
|
|
|
10 |
login(token=os.environ.get('HF_KEY'))
|
11 |
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
+
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9", torch_dtype=torch.float16) if torch.cuda.is_available() else StableDiffusionImg2ImgPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-0.9")
|
14 |
pipe = pipe.to(device)
|
15 |
|
16 |
def resize(value,img):
|