sming256 commited on
Commit
79e6f86
·
verified ·
1 Parent(s): 0618c41

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -98,9 +98,8 @@ class Qwen3VLAutoThinkDemo:
98
  self.model = Qwen3VLForConditionalGeneration.from_pretrained(
99
  model_path,
100
  dtype="bfloat16",
101
- device_map="auto",
102
  attn_implementation="sdpa",
103
- ).eval()
104
 
105
  self.processor = AutoProcessor.from_pretrained(model_path)
106
  self.tokenizer = AutoTokenizer.from_pretrained(model_path)
@@ -200,8 +199,8 @@ class Qwen3VLAutoThinkDemo:
200
  Returns:
201
  Dictionary containing response and metadata
202
  """
203
- if self.model.device.type != "cuda":
204
- self.model.to("cuda")
205
 
206
  # Prepare message
207
  message = [{"role": "system", "content": self.system_prompt}]
 
98
  self.model = Qwen3VLForConditionalGeneration.from_pretrained(
99
  model_path,
100
  dtype="bfloat16",
 
101
  attn_implementation="sdpa",
102
+ ).to('cuda').eval()
103
 
104
  self.processor = AutoProcessor.from_pretrained(model_path)
105
  self.tokenizer = AutoTokenizer.from_pretrained(model_path)
 
199
  Returns:
200
  Dictionary containing response and metadata
201
  """
202
+ # if self.model.device.type != "cuda":
203
+ # self.model.to("cuda")
204
 
205
  # Prepare message
206
  message = [{"role": "system", "content": self.system_prompt}]