Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,6 +21,14 @@ import io
|
|
| 21 |
from google.oauth2 import service_account
|
| 22 |
from google.cloud import storage
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
import torch
|
| 25 |
# Torch performance settings
|
| 26 |
torch.backends.cuda.matmul.allow_tf32 = False
|
|
@@ -88,6 +96,7 @@ upscaler_2 = UpscaleWithModel.from_pretrained("Kim2091/ClearRealityV1").to(devic
|
|
| 88 |
MAX_SEED = np.iinfo(np.int32).max
|
| 89 |
MAX_IMAGE_SIZE = 4096
|
| 90 |
|
|
|
|
| 91 |
@spaces.GPU(duration=45)
|
| 92 |
def generate_images_30(prompt, neg_prompt_1, neg_prompt_2, neg_prompt_3, width, height, guidance, steps, progress=gr.Progress(track_tqdm=True)):
|
| 93 |
seed = random.randint(0, MAX_SEED)
|
|
|
|
| 21 |
from google.oauth2 import service_account
|
| 22 |
from google.cloud import storage
|
| 23 |
|
| 24 |
+
|
| 25 |
+
@spaces.GPU(required=True)
|
| 26 |
+
def install_flashattn():
|
| 27 |
+
subprocess.run(['sh', './flashattn.sh'])
|
| 28 |
+
|
| 29 |
+
install_flashattn()
|
| 30 |
+
|
| 31 |
+
|
| 32 |
import torch
|
| 33 |
# Torch performance settings
|
| 34 |
torch.backends.cuda.matmul.allow_tf32 = False
|
|
|
|
| 96 |
MAX_SEED = np.iinfo(np.int32).max
|
| 97 |
MAX_IMAGE_SIZE = 4096
|
| 98 |
|
| 99 |
+
|
| 100 |
@spaces.GPU(duration=45)
|
| 101 |
def generate_images_30(prompt, neg_prompt_1, neg_prompt_2, neg_prompt_3, width, height, guidance, steps, progress=gr.Progress(track_tqdm=True)):
|
| 102 |
seed = random.randint(0, MAX_SEED)
|