Fix encoder
Browse files- convert_to_openvino.py +2 -2
convert_to_openvino.py
CHANGED
@@ -11,12 +11,12 @@ taesd.save_config("./")
|
|
11 |
|
12 |
# TAESD Decoder
|
13 |
|
14 |
-
taesd.forward = lambda latent_sample: taesd.decode(latent_sample)
|
15 |
export(model = taesd, config = VaeDecoderOnnxConfig( config = taesd.config, task = "semantic-segmentation"), output = "./vae_decoder/openvino_model.xml")
|
16 |
taesd.save_config("./vae_decoder")
|
17 |
|
18 |
# TAESD Encoder
|
19 |
|
20 |
-
taesd.forward = lambda sample: taesd.encode(sample)
|
21 |
export(model = taesd, config = VaeEncoderOnnxConfig( config = taesd.config, task = "semantic-segmentation"), output = "./vae_encoder/openvino_model.xml")
|
22 |
taesd.save_config("./vae_encoder")
|
|
|
11 |
|
12 |
# TAESD Decoder
|
13 |
|
14 |
+
taesd.forward = lambda latent_sample: taesd.decode(x=latent_sample)
|
15 |
export(model = taesd, config = VaeDecoderOnnxConfig( config = taesd.config, task = "semantic-segmentation"), output = "./vae_decoder/openvino_model.xml")
|
16 |
taesd.save_config("./vae_decoder")
|
17 |
|
18 |
# TAESD Encoder
|
19 |
|
20 |
+
taesd.forward = lambda sample: {"latent_sample": taesd.encode(x=sample)["latents"]}
|
21 |
export(model = taesd, config = VaeEncoderOnnxConfig( config = taesd.config, task = "semantic-segmentation"), output = "./vae_encoder/openvino_model.xml")
|
22 |
taesd.save_config("./vae_encoder")
|