Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,8 @@ authtoken = os.getenv('authtoken')
|
|
21 |
|
22 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
23 |
context = autocast if device == "cuda" else nullcontext
|
24 |
-
|
|
|
25 |
pipe = pipe.to(device)
|
26 |
|
27 |
def predict(input, manual_query_repacement, history=[]):
|
|
|
21 |
|
22 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
23 |
context = autocast if device == "cuda" else nullcontext
|
24 |
+
dtype = torch.float16 if device == "cuda" else torch.float32
|
25 |
+
pipe = StableDiffusionPipeline.from_pretrained("stale2000/sd-dnditem", torch_dtype=dtype, use_auth_token=authtoken)
|
26 |
pipe = pipe.to(device)
|
27 |
|
28 |
def predict(input, manual_query_repacement, history=[]):
|