fmasterpro27 commited on
Commit
acd67b4
·
verified ·
1 Parent(s): 8121ad8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from diffusers import DiffusionPipeline, AutoPipelineForText2Image
7
  import torch
8
 
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
- model_repo_id = "stabilityai/stable-diffusion-xl-base-1.0"
11
 
12
  if torch.cuda.is_available():
13
  torch_dtype = torch.float16
@@ -50,7 +50,7 @@ def infer(
50
  image = pipe(
51
  prompt=prompt,
52
  negative_prompt=negative_prompt,
53
- guidance_scale=0.0, # SDXL-Turbo requires 0.0
54
  num_inference_steps=max(1, min(4, num_inference_steps)), # Clamp to 1-4
55
  width=width,
56
  height=height,
 
7
  import torch
8
 
9
  device = "cuda" if torch.cuda.is_available() else "cpu"
10
+ model_repo_id = "ByteDance/SDXL-Lightning"
11
 
12
  if torch.cuda.is_available():
13
  torch_dtype = torch.float16
 
50
  image = pipe(
51
  prompt=prompt,
52
  negative_prompt=negative_prompt,
53
+ guidance_scale=4, # SDXL-Turbo requires 0.0
54
  num_inference_steps=max(1, min(4, num_inference_steps)), # Clamp to 1-4
55
  width=width,
56
  height=height,