XnOwO commited on
Commit
176a756
·
verified ·
1 Parent(s): 895a6cf

Update app.py from anycoder

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,15 +22,15 @@ text_encoder_2 = AutoModel.from_pretrained(
22
  )
23
 
24
  print("正在加载 Pipeline...")
25
- # 优化:明确设置 EulerDiscreteScheduler 以确保兼容性
26
  pipe_newbie = NewbiePipeline.from_pretrained(
27
  model_path,
28
  text_encoder_2=text_encoder_2,
29
  torch_dtype=torch_dtype
30
  )
31
 
32
- # 确保使用兼容的调度器
33
- pipe_newbie.scheduler = EulerDiscreteScheduler.from_config(pipe_newbie.scheduler.config)
34
 
35
  pipe_newbie.to("cuda")
36
  print("模型加载完成。")
 
22
  )
23
 
24
  print("正在加载 Pipeline...")
25
+ # 优化:移除显式调度器设置,让模型自动加载正确的调度器
26
  pipe_newbie = NewbiePipeline.from_pretrained(
27
  model_path,
28
  text_encoder_2=text_encoder_2,
29
  torch_dtype=torch_dtype
30
  )
31
 
32
+ # 打印调度器信息以调试
33
+ print(f"模型使用的调度器: {type(pipe_newbie.scheduler).__name__}")
34
 
35
  pipe_newbie.to("cuda")
36
  print("模型加载完成。")