Spaces:
Running
on
T4
Running
on
T4
Krebzonide
commited on
Commit
·
3f9da05
1
Parent(s):
4358e59
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from diffusers import AutoPipelineForText2Image, StableDiffusionImg2ImgPipeline
|
2 |
import torchvision.transforms.functional as fn
|
|
|
3 |
import gradio as gr
|
4 |
import random
|
5 |
import torch
|
@@ -25,7 +26,7 @@ def generate(prompt, samp_steps, batch_size, seed, progress=gr.Progress(track_tq
|
|
25 |
guidance_scale=0.0,
|
26 |
generator=torch.manual_seed(seed),
|
27 |
).images
|
28 |
-
upscaled_images = fn.resize(images, 1024,
|
29 |
final_images = img2img(
|
30 |
prompt,
|
31 |
num_inference_steps=samp_steps,
|
|
|
1 |
from diffusers import AutoPipelineForText2Image, StableDiffusionImg2ImgPipeline
|
2 |
import torchvision.transforms.functional as fn
|
3 |
+
import torchvision.transforms.InterpolationMode as interp
|
4 |
import gradio as gr
|
5 |
import random
|
6 |
import torch
|
|
|
26 |
guidance_scale=0.0,
|
27 |
generator=torch.manual_seed(seed),
|
28 |
).images
|
29 |
+
upscaled_images = fn.resize(images, 1024, interp.NEAREST_EXACT)
|
30 |
final_images = img2img(
|
31 |
prompt,
|
32 |
num_inference_steps=samp_steps,
|