Skip to content

Commit

Permalink
fix(api): patch VAE for SD upscaling on older versions of diffusers (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Mar 11, 2023
1 parent 6bdaa4a commit e960ee1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ def __init__(
scheduler: Any,
max_noise_level: int = 350,
):
if getattr(vae, "config") is None:
setattr(vae, "config", {
"scaling_factor": 0.08333,
})

super().__init__(vae, text_encoder, tokenizer, unet, low_res_scheduler, scheduler, max_noise_level)

def __call__(
Expand Down

0 comments on commit e960ee1

Please sign in to comment.