Spaces:
Sleeping
Sleeping
fix dispatch
Browse files
app.py
CHANGED
@@ -161,7 +161,7 @@ class ModelContext:
|
|
161 |
if hasattr(pipeline, 'reset_device_map'):
|
162 |
pipeline.reset_device_map()
|
163 |
# Enable automatic device mapping strategy
|
164 |
-
dispatch_model(pipeline)
|
165 |
return pipeline
|
166 |
|
167 |
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
|
161 |
if hasattr(pipeline, 'reset_device_map'):
|
162 |
pipeline.reset_device_map()
|
163 |
# Enable automatic device mapping strategy
|
164 |
+
dispatch_model(pipeline, device_map="auto")
|
165 |
return pipeline
|
166 |
|
167 |
def __exit__(self, exc_type, exc_val, exc_tb):
|