Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Stable Diffusion XL Long Weighted Prompt Pipeline (#461)
#413 paddle  torch  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") ```
- Loading branch information