educrpg commited on
Commit
df42351
Β·
verified Β·
1 Parent(s): afaa37c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,13 +13,13 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
13
  #pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
14
  sdxl = InferenceClient(model="stabilityai/stable-diffusion-xl-base-1.0", token=os.environ['HF_TOKEN'])
15
 
16
- pipeline2Image = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtypes=torch.bfloat16).to("cpu")
17
 
18
  MAX_SEED = np.iinfo(np.int32).max
19
  MAX_IMAGE_SIZE = 2048
20
 
21
  # (duration=190)
22
- @spaces.GPU
23
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=5.0, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
24
  if randomize_seed:
25
  seed = random.randint(0, MAX_SEED)
 
13
  #pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
14
  sdxl = InferenceClient(model="stabilityai/stable-diffusion-xl-base-1.0", token=os.environ['HF_TOKEN'])
15
 
16
+ pipeline2Image = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0", torch_dtypes=torch.bfloat16).to(device)
17
 
18
  MAX_SEED = np.iinfo(np.int32).max
19
  MAX_IMAGE_SIZE = 2048
20
 
21
  # (duration=190)
22
+ #@spaces.GPU
23
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=5.0, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
24
  if randomize_seed:
25
  seed = random.randint(0, MAX_SEED)