Spaces:
Running
on
T4
Running
on
T4
Krebzonide
commited on
Commit
·
3976ed9
1
Parent(s):
24176cc
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from PIL import Image
|
|
3 |
import gradio as gr
|
4 |
import random
|
5 |
import torch
|
|
|
6 |
|
7 |
css = """
|
8 |
.btn-green {
|
@@ -28,7 +29,7 @@ def generate(prompt, samp_steps, seed, strength, progress=gr.Progress(track_tqdm
|
|
28 |
final_image = img2img(
|
29 |
prompt,
|
30 |
upscaled_image,
|
31 |
-
num_inference_steps=
|
32 |
guidance_scale=5,
|
33 |
strength=strength,
|
34 |
generator=torch.manual_seed(seed),
|
|
|
3 |
import gradio as gr
|
4 |
import random
|
5 |
import torch
|
6 |
+
import math
|
7 |
|
8 |
css = """
|
9 |
.btn-green {
|
|
|
29 |
final_image = img2img(
|
30 |
prompt,
|
31 |
upscaled_image,
|
32 |
+
num_inference_steps=math.ceil(samp_steps/strength),
|
33 |
guidance_scale=5,
|
34 |
strength=strength,
|
35 |
generator=torch.manual_seed(seed),
|