Spaces:
Runtime error
Runtime error
yanranxiaoxi
commited on
Commit
•
4d199a2
1
Parent(s):
1c843cb
chore: fix
Browse files
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 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
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:
|