-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Stable Diffusion XL Long Weighted Prompt Pipeline #461
Conversation
Thanks for your contribution! |
抱歉忘了强调版本了,需要参考diffusers 0.24.0的相关代码来实现,当前develop与diffusers 0.24.0对齐 |
使用的是对齐diffusers 0.24.0的develop版本 |
diffusers 0.24.0貌似不需要用到StableDiffusionMixin |
已修改取消 StableDiffusionMixin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@westfish CI已完成 |
|
PaddlePaddle#413 paddle ![image](https://github.com/PaddlePaddle/PaddleMIX/assets/4617245/938e44c1-a0c1-4a34-8496-f63bc1592673) torch ![torch_out](https://github.com/PaddlePaddle/PaddleMIX/assets/4617245/de1be876-c3bb-4614-bca0-46a150f7d7fa) paddle, torch生成图一致 torch 代码 ``` from diffusers import DiffusionPipeline import torch pipe = DiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0" , torch_dtype = torch.float16 , use_safetensors = True , variant = "fp16" , custom_pipeline = "lpw_stable_diffusion_xl", ) prompt = "photo of a cute (white) cat running on the grass"*20 prompt2 = "chasing (birds:1.5)"*20 prompt = f"{prompt},{prompt2}" neg_prompt = "blur, low quality, carton, animate" pipe.to("cuda") images = pipe( prompt = prompt , negative_prompt = neg_prompt , generator=torch.Generator("cuda").manual_seed(452) ).images[0] images.save("torch_out.png") ```
#413
paddle
![image](https://private-user-images.githubusercontent.com/4617245/311974239-938e44c1-a0c1-4a34-8496-f63bc1592673.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI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UMDMzMjM1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGE4OTUxNDdlYzlhMzQ4NTEyMTA2M2IxNWZiMTM0NDkzNjQwNWI5YTBhOGUwMjAxMTAzNGY5YzFiOGY3OGQ4NyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.6uyCje6Px6cfdAImFqn4igHt3oLL2J9wH5VVkGkfVOk)
paddle, torch生成图一致
torch 代码