JoPmt commited on
Commit
6dd7f71
1 Parent(s): 80f9d55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -8,12 +8,11 @@ from transformers import pipeline
8
  from diffusers.utils import load_image
9
  from accelerate import Accelerator
10
 
11
- accelerator = Accelerator()
12
- apol=[]
13
  pipe = accelerator.prepare(StableDiffusionPipeline.from_single_file("https://huggingface.co/lllyasviel/fav_models/fav/DreamShaper_8_pruned.safetensors",torch_dtype=torch.float32, variant=None, use_safetensors=True, safety_checker=None))
14
  ##pipe.scheduler = accelerator.prepare(EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config))
15
  pipe.unet.to(memory_format=torch.channels_last)
16
- pipe = accelerator.prepare(pipe.to("cpu"))
17
  def plex(prompt,neg_prompt,stips,scaly,nut):
18
  apol=[]
19
  if nut == 0:
 
8
  from diffusers.utils import load_image
9
  from accelerate import Accelerator
10
 
11
+ accelerator = Accelerator(cpu=True)
 
12
  pipe = accelerator.prepare(StableDiffusionPipeline.from_single_file("https://huggingface.co/lllyasviel/fav_models/fav/DreamShaper_8_pruned.safetensors",torch_dtype=torch.float32, variant=None, use_safetensors=True, safety_checker=None))
13
  ##pipe.scheduler = accelerator.prepare(EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config))
14
  pipe.unet.to(memory_format=torch.channels_last)
15
+ pipe.to("cpu")
16
  def plex(prompt,neg_prompt,stips,scaly,nut):
17
  apol=[]
18
  if nut == 0: