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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -64,10 +64,13 @@ 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
- 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
 
 
 
 
 
 
71
  pipe.load_lora_weights('ford442/sdxl-vae-bf16', weight_name='LoRA/bm-goth_epoch_9.safetensors')
72
 
73
 
@@ -80,7 +83,6 @@ pipe.load_lora_weights('ford442/sdxl-vae-bf16', weight_name='LoRA/bm-goth_epoch_
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)
 
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("ford442/sdxl-vae-bf16", subfolder='sd3-medium-vae', 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",
70
+ vae=None,
71
+ token=True
72
+ )
73
+ pipe.vae=vaeSD3
74
  pipe.load_lora_weights('ford442/sdxl-vae-bf16', weight_name='LoRA/bm-goth_epoch_9.safetensors')
75
 
76
 
 
83
  #pipe.scheduler.config.requires_aesthetics_score = False
84
  #pipe.enable_model_cpu_offload()
85
  #pipe.to(device)
 
86
  pipe.to(device)
87
 
88
  #pipe = torch.compile(pipe)