CyranoB commited on
Commit
87ea128
·
1 Parent(s): a1bfb17

Fix for CPU support

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. requirements.txt +1 -3
app.py CHANGED
@@ -126,7 +126,7 @@ def generate_image(prompt, ckpt, aspect_ratio, mode):
126
  # Ensure sampler uses "trailing" timesteps.
127
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
128
 
129
- pipe.unet.load_state_dict(load_file(hf_hub_download(repo, checkpoint), device=device)
130
  results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0, width=width, height=height )
131
 
132
  if SAFETY_CHECKER:
 
126
  # Ensure sampler uses "trailing" timesteps.
127
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
128
 
129
+ pipe.unet.load_state_dict(load_file(hf_hub_download(repo, checkpoint), device=device))
130
  results = pipe(prompt, num_inference_steps=num_inference_steps, guidance_scale=0, width=width, height=height )
131
 
132
  if SAFETY_CHECKER:
requirements.txt CHANGED
@@ -2,6 +2,4 @@ transformers
2
  diffusers
3
  torch
4
  accelerate
5
- gradio
6
- pillow
7
- spaces
 
2
  diffusers
3
  torch
4
  accelerate
5
+ pillow