huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
25.11k stars 5.18k forks source link

lpw_stable_diffusion_onnx doesn't work #3597

Closed dushwe closed 1 year ago

dushwe commented 1 year ago

Describe the bug

lpw_stable_diffusion_onnx doesn't work

prompt ="((ghibli style)), san (mononoke hime), 1girl, armlet, bangs, black hair, black undershirt, circlet, earrings, facepaint, floating hair, forest, fur cape, green eyes, jewelry, looking at viewer, nature, outdoors, parted bangs, short hair, sleeveless shirt, solo, tooth necklace, tree, upper body,anime coloring, watercolor (medium),(bad anatomy:1.3), bad proportions, blurry, cloned face, cropped, deformed, dehydrated, disfigured, duplicate, error, (extra arms:1.4), extra fingers, extra legs, (extra limbs:1.4), fused fingers, gross proportions, jpeg artifacts, long neck, (low quality:1.4), (lowres:1.4), malformed limbs, missing arms, missing legs, morbid, mutated hands, mutation, mutilated, out of frame, (poorly drawn face:1.4), poorly drawn hands, signature, text, too many fingers, ugly, username, watermark, (worst quality:1.4), easynegative, extra, fewer fingers, bad-artist-anime,letterbox, text, signature, watermark,frame,(sexy underwear),(underpants),(womens briefs),(bare breast),boobs, big breast, (nsfw:1.5),(naked1:2), nude,(((national flag))),((flag of England)),(flag of American:1.5),(the Old Glory),(the Stars and the Stripes),(Japanese flag),((Chinese national flag)),((Five-Starred Red flag)),((Flag of China)),((Chinese flag)),(((army))),(((armed forces))),(((military))),(((nuclear weapon))),((((weapon)))),((recaptureTaiwan)),(Military Equipment"

was truncated, clip only process 77 tokens

Reproduction

pipe = ORTStableDiffusionPipeline.from_pretrained( model_id,
custom_pipeline="lpw_stable_diffusion_onnx", torch_dtype=torch.float16, provider="CUDAExecutionProvider",

provider="CPUExecutionProvider",

    safety_checker=None
   ).to(device)

sampling = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config) pipe.scheduler = sampling

Logs

The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ['tree, upper body, anime coloring, watercolor \\ ( medium \\ ), ( bad anatomy : 1. 3 ), bad proportions, blurry, cloned face, cropped, deformed, dehydrated, disfigured, duplicate, error, ( extra arms : 1. 4 ), extra fingers, extra legs, ( extra limbs : 1. 4 ), fused fingers, gross proportions, jpeg artifacts, long neck, ( low quality : 1. 4 ), ( lowres : 1. 4 ), malformed limbs, missing arms, missing legs, morbid, mutated hands, mutation, mutilated, out of frame, ( poorly drawn face : 1. 4 ), poorly drawn hands, signature, text, too many fingers, ugly, username, watermark, ( worst quality : 1. 4 ), easynegative, extra, fewer fingers, bad - artist - anime, letterbox, text, signature, watermark, frame, ( sexy underwear ), ( underpants ), ( womens briefs ), ( bare breast ), boobs, big breast, ( nsfw : 1. 5 ), ( naked 1 : 2 ), nude, ( ( ( national flag ) ) ), ( ( flag of england ) ), ( flag of american : 1. 5 ), ( the old glory ), ( the stars and the stripes ), ( japanese flag ), ( ( chinese national flag ) ), ( ( five - starred red flag ) ), ( ( flag of china ) ), ( ( chinese flag ) ), ( ( ( army ) ) ), ( ( ( armed forces ) ) ), ( ( ( military ) ) ), ( ( ( nuclear weapon ) ) ), ( ( ( ( weapon ) ) ) ), ( ( recapturetaiwan ) ), ( military equipment']

System Info

diffuers: 0.16.1 onnx 1.13.1
onnxruntime 1.14.1
onnxruntime-gpu 1.14.1 torch: 1.12.1+cu113 python: 3.8.13

patrickvonplaten commented 1 year ago

cc @echarlaix @anton-l maybe?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.