Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def generate_image(prompt, height, width, num_inference_steps, seed=42, randomiz
|
|
| 44 |
width=int(width),
|
| 45 |
num_inference_steps=int(num_inference_steps),
|
| 46 |
guidance_scale=0.0, # Guidance should be 0 for Turbo models
|
| 47 |
-
generator = torch.Generator(device=
|
| 48 |
).images[0]
|
| 49 |
|
| 50 |
image_no_lora = pipe_no_lora(
|
|
@@ -53,7 +53,7 @@ def generate_image(prompt, height, width, num_inference_steps, seed=42, randomiz
|
|
| 53 |
width=int(width),
|
| 54 |
num_inference_steps=int(num_inference_steps),
|
| 55 |
guidance_scale=0.0, # Guidance should be 0 for Turbo models
|
| 56 |
-
generator = torch.Generator(device=
|
| 57 |
).images[0]
|
| 58 |
|
| 59 |
return (image_no_lora,image), seed
|
|
@@ -67,9 +67,9 @@ examples = [
|
|
| 67 |
["Astronaut riding a horse on Mars, cinematic lighting, sci-fi concept art, highly detailed"],
|
| 68 |
["Portrait of a wise old wizard with a long white beard, holding a glowing crystal staff, magical forest background"],
|
| 69 |
]
|
| 70 |
-
css = '''#col-container { max-width:
|
| 71 |
.dark .progress-text{color: white !important}
|
| 72 |
-
#examples{max-width:
|
| 73 |
# Build the Gradio interface
|
| 74 |
with gr.Blocks() as demo:
|
| 75 |
|
|
|
|
| 44 |
width=int(width),
|
| 45 |
num_inference_steps=int(num_inference_steps),
|
| 46 |
guidance_scale=0.0, # Guidance should be 0 for Turbo models
|
| 47 |
+
generator = torch.Generator(device="cuda").manual_seed(seed)
|
| 48 |
).images[0]
|
| 49 |
|
| 50 |
image_no_lora = pipe_no_lora(
|
|
|
|
| 53 |
width=int(width),
|
| 54 |
num_inference_steps=int(num_inference_steps),
|
| 55 |
guidance_scale=0.0, # Guidance should be 0 for Turbo models
|
| 56 |
+
generator = torch.Generator(device="cuda").manual_seed(seed)
|
| 57 |
).images[0]
|
| 58 |
|
| 59 |
return (image_no_lora,image), seed
|
|
|
|
| 67 |
["Astronaut riding a horse on Mars, cinematic lighting, sci-fi concept art, highly detailed"],
|
| 68 |
["Portrait of a wise old wizard with a long white beard, holding a glowing crystal staff, magical forest background"],
|
| 69 |
]
|
| 70 |
+
css = '''#col-container { max-width: 900px; margin: 0 auto; }
|
| 71 |
.dark .progress-text{color: white !important}
|
| 72 |
+
#examples{max-width: 900px; margin: 0 auto; }'''
|
| 73 |
# Build the Gradio interface
|
| 74 |
with gr.Blocks() as demo:
|
| 75 |
|