Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,8 @@ from generate import process, load_model, NORMAL_MAP_MODEL, OTHER_MAP_MODEL
|
|
| 9 |
# Ensure the utils directory is in the path
|
| 10 |
sys.path.append(os.path.join(os.path.dirname(__file__), 'utils'))
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
device = torch.device('
|
| 14 |
normal_map_model = load_model(NORMAL_MAP_MODEL)
|
| 15 |
other_map_model = load_model(OTHER_MAP_MODEL)
|
| 16 |
models = [normal_map_model, other_map_model]
|
|
@@ -39,7 +39,7 @@ def generate_maps(input_image, tile_size=512, seamless=False, mirror=False, repl
|
|
| 39 |
'replicate': replicate,
|
| 40 |
'ishiiruka': ishiiruka,
|
| 41 |
'ishiiruka_texture_encoder': ishiiruka_texture_encoder,
|
| 42 |
-
'cpu':
|
| 43 |
})()
|
| 44 |
|
| 45 |
# Create a mock parser and set args (simulating command-line args)
|
|
|
|
| 9 |
# Ensure the utils directory is in the path
|
| 10 |
sys.path.append(os.path.join(os.path.dirname(__file__), 'utils'))
|
| 11 |
|
| 12 |
+
# Force CPU usage
|
| 13 |
+
device = torch.device('cpu')
|
| 14 |
normal_map_model = load_model(NORMAL_MAP_MODEL)
|
| 15 |
other_map_model = load_model(OTHER_MAP_MODEL)
|
| 16 |
models = [normal_map_model, other_map_model]
|
|
|
|
| 39 |
'replicate': replicate,
|
| 40 |
'ishiiruka': ishiiruka,
|
| 41 |
'ishiiruka_texture_encoder': ishiiruka_texture_encoder,
|
| 42 |
+
'cpu': True # Force CPU usage
|
| 43 |
})()
|
| 44 |
|
| 45 |
# Create a mock parser and set args (simulating command-line args)
|