yanranxiaoxi commited on
Commit
4d199a2
1 Parent(s): 1c843cb

chore: fix

Browse files
Files changed (1) hide show
  1. app.py +12 -13
app.py CHANGED
@@ -42,19 +42,18 @@ parser.add_argument("--decoder_tile_size", type=int, default=64)
42
  parser.add_argument("--load_8bit_llava", action='store_true', default=False)
43
  args = parser.parse_args()
44
 
45
- if torch.cuda.device_count() > 0:
46
- BOOXEL_device = 'cpu'
47
-
48
- # 加载 BOOXEL
49
- model, default_setting = create_BOOXEL_model(args.opt, BOOXEL_sign='Q', load_default_setting=True)
50
- if args.loading_half_params:
51
- model = model.half()
52
- if args.use_tile_vae:
53
- model.init_tile_vae(encoder_tile_size=args.encoder_tile_size, decoder_tile_size=args.decoder_tile_size)
54
- model = model.to(BOOXEL_device)
55
- model.first_stage_model.denoise_encoder_s1 = copy.deepcopy(model.first_stage_model.denoise_encoder)
56
- model.current_model = 'v0-Q'
57
- ckpt_Q, ckpt_F = load_QF_ckpt(args.opt)
58
 
59
  def check_upload(input_image):
60
  if input_image is None:
 
42
  parser.add_argument("--load_8bit_llava", action='store_true', default=False)
43
  args = parser.parse_args()
44
 
45
+ BOOXEL_device = 'cpu'
46
+
47
+ # 加载 BOOXEL
48
+ model, default_setting = create_BOOXEL_model(args.opt, BOOXEL_sign='Q', load_default_setting=True)
49
+ if args.loading_half_params:
50
+ model = model.half()
51
+ if args.use_tile_vae:
52
+ model.init_tile_vae(encoder_tile_size=args.encoder_tile_size, decoder_tile_size=args.decoder_tile_size)
53
+ model = model.to(BOOXEL_device)
54
+ model.first_stage_model.denoise_encoder_s1 = copy.deepcopy(model.first_stage_model.denoise_encoder)
55
+ model.current_model = 'v0-Q'
56
+ ckpt_Q, ckpt_F = load_QF_ckpt(args.opt)
 
57
 
58
  def check_upload(input_image):
59
  if input_image is None: