# Stable diffusion sometimes generates images with weird lines

**URL:** <https://discuss.huggingface.co/t/stable-diffusion-sometimes-generates-images-with-weird-lines/46233>\
**Category:** 🧨 Diffusers\
**Created:** [July 10, 2023, 5:32am UTC](https://discuss.huggingface.co/t/stable-diffusion-sometimes-generates-images-with-weird-lines/46233 "2023-07-10T05:32:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sh-lee](https://avatars.discourse-cdn.com/v4/letter/s/67e7ee/32.png) [@sh-lee](https://discuss.huggingface.co/u/sh-lee)\
**Post date:** [July 10, 2023, 5:32am UTC](https://discuss.huggingface.co/t/stable-diffusion-sometimes-generates-images-with-weird-lines/46233/1 "2023-07-10T05:32:53Z")

</div>

When I generate image with huggingface stable diffusion pipeline, it sometimes generate with weird green, yellow and red lines as shown in the picture([https://i.stack.imgur.com/L9RpJ.jpg](https://i.stack.imgur.com/L9RpJ.jpg)).

Is anyone who knows the reason of this, and how I can remove this lines?

To reproduce :

```auto
model_id = "../stable-diffusion-2" # I download stable-diffusion-2's weight and code
prompt = "best quality, extremely detailed"

scheduler = LMSDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, torch_dtype=torch.float16)
image = pipe(prompt).images[0]

```
