ford442 commited on
Commit
6366558
·
verified ·
1 Parent(s): bd67d99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -64,6 +64,7 @@ checkpoint = "microsoft/Phi-3.5-mini-instruct"
64
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
65
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
66
  #vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False) #, device_map='cpu') #.to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
 
67
 
68
  pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16",token=True)
69
 
@@ -79,7 +80,9 @@ pipe.load_lora_weights('ford442/sdxl-vae-bf16', weight_name='LoRA/bm-goth_epoch_
79
  #pipe.scheduler.config.requires_aesthetics_score = False
80
  #pipe.enable_model_cpu_offload()
81
  #pipe.to(device)
82
- #pipe.to(device=device, dtype=torch.bfloat16)
 
 
83
  #pipe = torch.compile(pipe)
84
  # pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear")
85
 
 
64
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
65
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
66
  #vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", safety_checker=None, use_safetensors=False) #, device_map='cpu') #.to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
67
+ vaeSD3 = AutoencoderKL.from_pretrained("stabilityai/stable-diffusion-3.5-medium", safety_checker=None) #, device_map='cpu') #.to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
68
 
69
  pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16",token=True)
70
 
 
80
  #pipe.scheduler.config.requires_aesthetics_score = False
81
  #pipe.enable_model_cpu_offload()
82
  #pipe.to(device)
83
+ pipe.vae=vaeSD3
84
+ pipe.to(device)
85
+
86
  #pipe = torch.compile(pipe)
87
  # pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear")
88