Upload folder using huggingface_hub
Browse files
main/pipeline_flux_rf_inversion.py
CHANGED
@@ -419,7 +419,7 @@ class RFInversionFluxPipeline(
|
|
419 |
)
|
420 |
image = image.to(dtype)
|
421 |
|
422 |
-
x0 = self.vae.encode(image.to(self.
|
423 |
x0 = (x0 - self.vae.config.shift_factor) * self.vae.config.scaling_factor
|
424 |
x0 = x0.to(dtype)
|
425 |
return x0, resized
|
|
|
419 |
)
|
420 |
image = image.to(dtype)
|
421 |
|
422 |
+
x0 = self.vae.encode(image.to(self._execution_device)).latent_dist.sample()
|
423 |
x0 = (x0 - self.vae.config.shift_factor) * self.vae.config.scaling_factor
|
424 |
x0 = x0.to(dtype)
|
425 |
return x0, resized
|