Spaces:
Running
Running
Parameter for CUDA
Browse files
app.py
CHANGED
@@ -11,7 +11,8 @@ import torch
|
|
11 |
max_64_bit_int = 2**63 - 1
|
12 |
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
-
|
|
|
15 |
pipe = pipe.to(device)
|
16 |
|
17 |
def noise_color(color, noise):
|
|
|
11 |
max_64_bit_int = 2**63 - 1
|
12 |
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
+
floatType = torch.float16 if torch.cuda.is_available() else torch.float32
|
15 |
+
pipe = StableDiffusionXLInpaintPipeline.from_pretrained("diffusers/stable-diffusion-xl-1.0-inpainting-0.1", torch_dtype = floatType)
|
16 |
pipe = pipe.to(device)
|
17 |
|
18 |
def noise_color(color, noise):
|