jpjp9292 commited on
Commit
5514df7
·
verified ·
1 Parent(s): 380e88c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,8 +20,8 @@ vae_path = "stabilityai/sd-vae-ft-mse"
20
  # 모델 및 VAE를 로드합니다.
21
  pipes = {}
22
  for name, path in model_paths.items():
23
- pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16)
24
- pipe.vae = StableDiffusionPipeline.from_pretrained(vae_path).vae
25
  pipes[name] = pipe
26
 
27
  def generate_image(prompt, negative_prompt, model_name, steps, sampler, cfg_scale, width, height, seed):
 
20
  # 모델 및 VAE를 로드합니다.
21
  pipes = {}
22
  for name, path in model_paths.items():
23
+ pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16, low_cpu_mem_usage=True)
24
+ pipe.vae = StableDiffusionPipeline.from_pretrained(vae_path, low_cpu_mem_usage=True).vae
25
  pipes[name] = pipe
26
 
27
  def generate_image(prompt, negative_prompt, model_name, steps, sampler, cfg_scale, width, height, seed):