pepper13 commited on
Commit
f51dfbd
1 Parent(s): 147b85b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -4,7 +4,10 @@ import random
4
  from diffusers import DiffusionPipeline
5
  import torch
6
 
7
- torch_dtype, device = torch.float16, torch.device("cuda") if torch.cuda.is_available() else torch.float32, torch.device("cpu")
 
 
 
8
 
9
  model_repo_id = "black-forest-labs/FLUX.1-dev"
10
 
@@ -14,11 +17,11 @@ pipe.load_lora_weights("pepper13/flux-anime")
14
  def infer(prompt, randomize_seed, width, height, guidance_scale, num_inference_steps):
15
  image = pipe(
16
  prompt=prompt,
17
- guidance_scale=guidance_scale,
18
- num_inference_steps=num_inference_steps,
19
- width=width,
20
  height=height
21
- ).images[0]
22
 
23
  return image
24
 
 
4
  from diffusers import DiffusionPipeline
5
  import torch
6
 
7
+ torch_dtype, device = (
8
+ (torch.float16, torch.device("cuda")) if torch.cuda.is_available()
9
+ else (torch.float32, torch.device("cpu"))
10
+ )
11
 
12
  model_repo_id = "black-forest-labs/FLUX.1-dev"
13
 
 
17
  def infer(prompt, randomize_seed, width, height, guidance_scale, num_inference_steps):
18
  image = pipe(
19
  prompt=prompt,
20
+ guidance_scale=guidance_scale,
21
+ num_inference_steps=num_inference_steps,
22
+ width=width,
23
  height=height
24
+ ).images[0]
25
 
26
  return image
27