ford442 commited on
Commit
3cd5343
·
verified ·
1 Parent(s): e6526e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -60,18 +60,18 @@ checkpoint = "microsoft/Phi-3.5-mini-instruct"
60
  #vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
61
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
62
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
63
- 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)
64
 
65
- #pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16").to(device=device, dtype=torch.bfloat16)
66
  #pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16").to(torch.device("cuda:0"))
67
- pipe = StableDiffusion3Pipeline.from_pretrained("ford442/RealVis_Medium_1.0b_bf16", torch_dtype=torch.bfloat16)
68
  #pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", token=hftoken, torch_dtype=torch.float32, device_map='balanced')
69
 
70
  # pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++")
71
 
72
  #pipe.scheduler.config.requires_aesthetics_score = False
73
  #pipe.enable_model_cpu_offload()
74
- pipe.to(device)
75
  #pipe.to(device=device, dtype=torch.bfloat16)
76
  #pipe = torch.compile(pipe)
77
  # pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear")
 
60
  #vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
61
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
62
  #vae = AutoencoderKL.from_pretrained("ford442/sdxl-vae-bf16")
63
+ #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)
64
 
65
+ pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16").to(device=device, dtype=torch.bfloat16)
66
  #pipe = StableDiffusion3Pipeline.from_pretrained("ford442/stable-diffusion-3.5-medium-bf16").to(torch.device("cuda:0"))
67
+ #pipe = StableDiffusion3Pipeline.from_pretrained("ford442/RealVis_Medium_1.0b_bf16", torch_dtype=torch.bfloat16)
68
  #pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-medium", token=hftoken, torch_dtype=torch.float32, device_map='balanced')
69
 
70
  # pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config, use_karras_sigmas=True, algorithm_type="sde-dpmsolver++")
71
 
72
  #pipe.scheduler.config.requires_aesthetics_score = False
73
  #pipe.enable_model_cpu_offload()
74
+ #pipe.to(device)
75
  #pipe.to(device=device, dtype=torch.bfloat16)
76
  #pipe = torch.compile(pipe)
77
  # pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config, beta_schedule="scaled_linear")