josuelmet commited on
Commit
a3f6bed
1 Parent(s): f26d531

Update boomerang.py

Browse files
Files changed (1) hide show
  1. boomerang.py +3 -2
boomerang.py CHANGED
@@ -251,6 +251,7 @@ def call(
251
  return StableDiffusionPipelineOutput(images=image, nsfw_content_detected=has_nsfw_concept)
252
 
253
 
254
- pipe.unet.forward = MethodType(forward, pipe.unet)
255
- pipe.safety_checker.forward = MethodType(safety_forward, pipe.safety_checker)
 
256
  type(pipe).__call__ = call
 
251
  return StableDiffusionPipelineOutput(images=image, nsfw_content_detected=has_nsfw_concept)
252
 
253
 
254
+ if COLAB:
255
+ pipe.unet.forward = MethodType(forward, pipe.unet)
256
+ pipe.safety_checker.forward = MethodType(safety_forward, pipe.safety_checker)
257
  type(pipe).__call__ = call