abreza commited on
Commit
661bc0f
1 Parent(s): 65dc797

comment sdxl

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -185,18 +185,18 @@ model.load_state_dict(state_dict, strict=True)
185
 
186
  model = model.to(device)
187
 
188
- # Load text-to-image model
189
- print('Loading text-to-image model ...')
190
-
191
- pipe = StableDiffusionXLPipeline.from_pretrained(
192
- "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.bfloat16)
193
- pipe.to(device="cuda", dtype=torch.bfloat16)
194
-
195
- unet_state = load_file(hf_hub_download(
196
- "ByteDance/Hyper-SD", "Hyper-SDXL-1step-Unet.safetensors"), device="cuda")
197
- pipe.unet.load_state_dict(unet_state)
198
- pipe.scheduler = LCMScheduler.from_config(
199
- pipe.scheduler.config, timestep_spacing="trailing")
200
 
201
  print('Loading Finished!')
202
 
 
185
 
186
  model = model.to(device)
187
 
188
+ # # Load text-to-image model
189
+ # print('Loading text-to-image model ...')
190
+
191
+ # pipe = StableDiffusionXLPipeline.from_pretrained(
192
+ # "stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.bfloat16)
193
+ # pipe.to(device="cuda", dtype=torch.bfloat16)
194
+
195
+ # unet_state = load_file(hf_hub_download(
196
+ # "ByteDance/Hyper-SD", "Hyper-SDXL-1step-Unet.safetensors"), device="cuda")
197
+ # pipe.unet.load_state_dict(unet_state)
198
+ # pipe.scheduler = LCMScheduler.from_config(
199
+ # pipe.scheduler.config, timestep_spacing="trailing")
200
 
201
  print('Loading Finished!')
202