Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 = "
|
| 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=
|
| 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,
|