Linoy Tsaban commited on
Commit
2aeea2e
1 Parent(s): aa5232a

Update modified_pipeline_semantic_stable_diffusion.py

Browse files
modified_pipeline_semantic_stable_diffusion.py CHANGED
@@ -721,18 +721,18 @@ class SemanticStableDiffusionPipeline(DiffusionPipeline):
721
  callback(i, t, latents)
722
 
723
 
724
- # 8. Post-processing
725
- image = self.decode_latents(latents)
726
 
727
- # 9. Run safety checker
728
- image, has_nsfw_concept = self.run_safety_checker(image, device, text_embeddings.dtype)
729
 
730
- # 10. Convert to PIL
731
- if output_type == "pil":
732
- image = self.numpy_to_pil(image)
733
 
734
- if not return_dict:
735
- return (image, has_nsfw_concept)
736
 
737
  #return StableDiffusionPipelineOutput(images=image, nsfw_content_detected=has_nsfw_concept)
738
 
 
721
  callback(i, t, latents)
722
 
723
 
724
+ # # 8. Post-processing
725
+ # image = self.decode_latents(latents)
726
 
727
+ # # 9. Run safety checker
728
+ # image, has_nsfw_concept = self.run_safety_checker(image, device, text_embeddings.dtype)
729
 
730
+ # # 10. Convert to PIL
731
+ # if output_type == "pil":
732
+ # image = self.numpy_to_pil(image)
733
 
734
+ # if not return_dict:
735
+ # return (image, has_nsfw_concept)
736
 
737
  #return StableDiffusionPipelineOutput(images=image, nsfw_content_detected=has_nsfw_concept)
738