rawc0der commited on
Commit
34a68a5
·
1 Parent(s): 96db79f

fix dispatch

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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):