cocktailpeanut commited on
Commit
b355b1a
·
1 Parent(s): 72b8226
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -4,7 +4,7 @@ from custom_pipeline import CosStableDiffusionXLInstructPix2PixPipeline
4
  from huggingface_hub import hf_hub_download
5
  import numpy as np
6
  import math
7
- import spaces
8
  import torch
9
 
10
  if torch.backends.mps.is_available():
@@ -43,11 +43,11 @@ pipe_normal = StableDiffusionXLPipeline.from_single_file(normal_file, torch_dtyp
43
  pipe_normal.scheduler = EDMEulerScheduler(sigma_min=0.002, sigma_max=120.0, sigma_data=1.0, prediction_type="v_prediction")
44
  pipe_normal.to(DEVICE)
45
 
46
- @spaces.GPU
47
  def run_normal(prompt, negative_prompt="", guidance_scale=7, progress=gr.Progress(track_tqdm=True)):
48
  return pipe_normal(prompt, negative_prompt=negative_prompt, guidance_scale=guidance_scale, num_inference_steps=20).images[0]
49
 
50
- @spaces.GPU
51
  def run_edit(image, prompt, negative_prompt="", guidance_scale=7, progress=gr.Progress(track_tqdm=True)):
52
  resolution = 1024
53
  image.resize((resolution, resolution))
 
4
  from huggingface_hub import hf_hub_download
5
  import numpy as np
6
  import math
7
+ #import spaces
8
  import torch
9
 
10
  if torch.backends.mps.is_available():
 
43
  pipe_normal.scheduler = EDMEulerScheduler(sigma_min=0.002, sigma_max=120.0, sigma_data=1.0, prediction_type="v_prediction")
44
  pipe_normal.to(DEVICE)
45
 
46
+ #@spaces.GPU
47
  def run_normal(prompt, negative_prompt="", guidance_scale=7, progress=gr.Progress(track_tqdm=True)):
48
  return pipe_normal(prompt, negative_prompt=negative_prompt, guidance_scale=guidance_scale, num_inference_steps=20).images[0]
49
 
50
+ #@spaces.GPU
51
  def run_edit(image, prompt, negative_prompt="", guidance_scale=7, progress=gr.Progress(track_tqdm=True)):
52
  resolution = 1024
53
  image.resize((resolution, resolution))