0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

diffusers 0.6.0でnegative_promptをlistで渡すと動かない問題

0
Posted at

なんかバグっているみたいです。

pipe = StableDiffusionPipeline.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    revision='fp16'
).to(device)

prompt = 'apple'
nprompt = 'red'

# 動く
images = pipe(prompt, negative_prompt=nprompt, guidance_scale=7.5)['images']

# これも動く
images = pipe([prompt], negative_prompt=[nprompt], guidance_scale=7.5)['images']

# 実はこれも動く
images = pipe([prompt] * 1, negative_prompt=[nprompt] * 1, guidance_scale=7.5)['images']

# 動かない
images = pipe([prompt] * 2, negative_prompt=[nprompt] * 2, guidance_scale=7.5)['images']

0.6.1が出たら起こしてください。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?