File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
tests/pipelines/stable_diffusion Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1246,9 +1246,12 @@ def test_download_from_hub(self):
12461246 assert image_out .shape == (512 , 512 , 3 )
12471247
12481248 def test_download_local (self ):
1249- filename = hf_hub_download ("runwayml/stable-diffusion-v1-5" , filename = "v1-5-pruned-emaonly.ckpt" )
1249+ ckpt_filename = hf_hub_download ("runwayml/stable-diffusion-v1-5" , filename = "v1-5-pruned-emaonly.ckpt" )
1250+ config_filename = hf_hub_download ("runwayml/stable-diffusion-v1-5" , filename = "v1-inference.yaml" )
12501251
1251- pipe = StableDiffusionPipeline .from_single_file (filename , torch_dtype = torch .float16 )
1252+ pipe = StableDiffusionPipeline .from_single_file (
1253+ ckpt_filename , config_files = {"v1" : config_filename }, torch_dtype = torch .float16
1254+ )
12521255 pipe .scheduler = DDIMScheduler .from_config (pipe .scheduler .config )
12531256 pipe .to ("cuda" )
12541257
You can’t perform that action at this time.
0 commit comments