Unverified Commit 187ea539 authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

Improve SD XL (#3968)

* improve sd xl

* correct more

* finish

* make style

* fix more
parent 8bf80fc8
...@@ -1029,7 +1029,7 @@ class StableDiffusionPipelineCkptTests(unittest.TestCase): ...@@ -1029,7 +1029,7 @@ class StableDiffusionPipelineCkptTests(unittest.TestCase):
] ]
for ckpt_path in ckpt_paths: for ckpt_path in ckpt_paths:
pipe = StableDiffusionPipeline.from_ckpt(ckpt_path, torch_dtype=torch.float16) pipe = StableDiffusionPipeline.from_single_file(ckpt_path, torch_dtype=torch.float16)
pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config) pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
pipe.to("cuda") pipe.to("cuda")
...@@ -1040,7 +1040,7 @@ class StableDiffusionPipelineCkptTests(unittest.TestCase): ...@@ -1040,7 +1040,7 @@ class StableDiffusionPipelineCkptTests(unittest.TestCase):
def test_download_local(self): def test_download_local(self):
filename = hf_hub_download("runwayml/stable-diffusion-v1-5", filename="v1-5-pruned-emaonly.ckpt") filename = hf_hub_download("runwayml/stable-diffusion-v1-5", filename="v1-5-pruned-emaonly.ckpt")
pipe = StableDiffusionPipeline.from_ckpt(filename, torch_dtype=torch.float16) pipe = StableDiffusionPipeline.from_single_file(filename, torch_dtype=torch.float16)
pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config) pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
pipe.to("cuda") pipe.to("cuda")
...@@ -1051,7 +1051,7 @@ class StableDiffusionPipelineCkptTests(unittest.TestCase): ...@@ -1051,7 +1051,7 @@ class StableDiffusionPipelineCkptTests(unittest.TestCase):
def test_download_ckpt_diff_format_is_same(self): def test_download_ckpt_diff_format_is_same(self):
ckpt_path = "https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt" ckpt_path = "https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt"
pipe = StableDiffusionPipeline.from_ckpt(ckpt_path) pipe = StableDiffusionPipeline.from_single_file(ckpt_path)
pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config) pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
pipe.unet.set_attn_processor(AttnProcessor()) pipe.unet.set_attn_processor(AttnProcessor())
pipe.to("cuda") pipe.to("cuda")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment