Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,14 +14,8 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
14 |
# # notebook_login(token_key)
|
15 |
|
16 |
@spaces.GPU
|
17 |
-
|
18 |
-
|
19 |
-
pipe = AutoPipelineForText2Image.from_pretrained("Shaleen123/kandinsky_2.5", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
20 |
-
pipe.enable_xformers_memory_efficient_attention()
|
21 |
-
pipe = pipe.to(device)
|
22 |
-
else:
|
23 |
-
pipe = AutoPipelineForText2Image.from_pretrained("Shaleen123/kandinsky_2.5", use_safetensors=True)
|
24 |
-
pipe = pipe.to(device)
|
25 |
|
26 |
MAX_SEED = np.iinfo(np.int32).max
|
27 |
MAX_IMAGE_SIZE = 1024
|
|
|
14 |
# # notebook_login(token_key)
|
15 |
|
16 |
@spaces.GPU
|
17 |
+
pipe = AutoPipelineForText2Image.from_pretrained("Shaleen123/kandinsky_2.5", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
18 |
+
pipe.enable_xformers_memory_efficient_attention()
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
MAX_SEED = np.iinfo(np.int32).max
|
21 |
MAX_IMAGE_SIZE = 1024
|