Datasets:

ArXiv:
diffusers-benchmarking-bot commited on
Commit
fac9909
·
verified ·
1 Parent(s): de28458

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. main/rerender_a_video.py +11 -1
main/rerender_a_video.py CHANGED
@@ -30,10 +30,17 @@ from diffusers.pipelines.controlnet.multicontrolnet import MultiControlNetModel
30
  from diffusers.pipelines.controlnet.pipeline_controlnet_img2img import StableDiffusionControlNetImg2ImgPipeline
31
  from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
32
  from diffusers.schedulers import KarrasDiffusionSchedulers
33
- from diffusers.utils import BaseOutput, deprecate, logging
34
  from diffusers.utils.torch_utils import is_compiled_module, randn_tensor
35
 
36
 
 
 
 
 
 
 
 
37
  logger = logging.get_logger(__name__) # pylint: disable=invalid-name
38
 
39
 
@@ -1100,6 +1107,9 @@ class RerenderAVideoPipeline(StableDiffusionControlNetImg2ImgPipeline):
1100
  if callback is not None and i % callback_steps == 0:
1101
  callback(i, t, latents)
1102
 
 
 
 
1103
  return latents
1104
 
1105
  if mask_start_t <= mask_end_t:
 
30
  from diffusers.pipelines.controlnet.pipeline_controlnet_img2img import StableDiffusionControlNetImg2ImgPipeline
31
  from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
32
  from diffusers.schedulers import KarrasDiffusionSchedulers
33
+ from diffusers.utils import BaseOutput, deprecate, is_torch_xla_available, logging
34
  from diffusers.utils.torch_utils import is_compiled_module, randn_tensor
35
 
36
 
37
+ if is_torch_xla_available():
38
+ import torch_xla.core.xla_model as xm
39
+
40
+ XLA_AVAILABLE = True
41
+ else:
42
+ XLA_AVAILABLE = False
43
+
44
  logger = logging.get_logger(__name__) # pylint: disable=invalid-name
45
 
46
 
 
1107
  if callback is not None and i % callback_steps == 0:
1108
  callback(i, t, latents)
1109
 
1110
+ if XLA_AVAILABLE:
1111
+ xm.mark_step()
1112
+
1113
  return latents
1114
 
1115
  if mask_start_t <= mask_end_t: