educrpg commited on
Commit
a348ce9
Β·
verified Β·
1 Parent(s): 5cbe517

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -10,10 +10,13 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
10
 
11
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
12
 
 
 
13
  MAX_SEED = np.iinfo(np.int32).max
14
  MAX_IMAGE_SIZE = 2048
15
 
16
- @spaces.GPU(duration=190)
 
17
  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)):
18
  if randomize_seed:
19
  seed = random.randint(0, MAX_SEED)
 
10
 
11
  pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to(device)
12
 
13
+ pipeline2Image = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-refiner-1.0").to(device)
14
+
15
  MAX_SEED = np.iinfo(np.int32).max
16
  MAX_IMAGE_SIZE = 2048
17
 
18
+ # (duration=190)
19
+ @spaces.GPU
20
  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)):
21
  if randomize_seed:
22
  seed = random.randint(0, MAX_SEED)