deinferno commited on
Commit
06aec4b
1 Parent(s): f753ab8

Fix encoder

Browse files
Files changed (1) hide show
  1. 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")