Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ hf_hub_download(repo_id="yucornetto/RAR", filename="rar_xl.bin", local_dir="./")
|
|
| 20 |
|
| 21 |
# @spaces.GPU
|
| 22 |
def load_model():
|
| 23 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 24 |
# load config
|
| 25 |
rar_model_size = "rar_xl"
|
| 26 |
config = demo_util.get_config("configs/training/generator/rar.yaml")
|
|
@@ -46,7 +46,7 @@ tokenizer, generator = load_model()
|
|
| 46 |
def demo_infer(
|
| 47 |
guidance_scale, randomize_temperature, guidance_scale_pow,
|
| 48 |
class_label, seed):
|
| 49 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 50 |
n = 4
|
| 51 |
class_labels = [class_label for _ in range(n)]
|
| 52 |
torch.manual_seed(seed)
|
|
|
|
| 20 |
|
| 21 |
# @spaces.GPU
|
| 22 |
def load_model():
|
| 23 |
+
device = "cuda" # if torch.cuda.is_available() else "cpu"
|
| 24 |
# load config
|
| 25 |
rar_model_size = "rar_xl"
|
| 26 |
config = demo_util.get_config("configs/training/generator/rar.yaml")
|
|
|
|
| 46 |
def demo_infer(
|
| 47 |
guidance_scale, randomize_temperature, guidance_scale_pow,
|
| 48 |
class_label, seed):
|
| 49 |
+
device = "cuda" # if torch.cuda.is_available() else "cpu"
|
| 50 |
n = 4
|
| 51 |
class_labels = [class_label for _ in range(n)]
|
| 52 |
torch.manual_seed(seed)
|