Spaces:
Running
on
Zero
Running
on
Zero
remove comment
Browse files
app.py
CHANGED
|
@@ -5,8 +5,6 @@ from PIL import Image
|
|
| 5 |
|
| 6 |
import os
|
| 7 |
import numpy as np
|
| 8 |
-
import shutil
|
| 9 |
-
#shutil.rmtree("/home/user/app/.gradio/cached_examples/23")
|
| 10 |
import torch
|
| 11 |
from diffusers import FluxImg2ImgPipeline
|
| 12 |
|
|
@@ -29,12 +27,12 @@ def sanitize_prompt(prompt):
|
|
| 29 |
|
| 30 |
@spaces.GPU(duration=120)
|
| 31 |
def process_images(image,prompt="a girl",strength=0.75,seed=0,inference_step=4,progress=gr.Progress(track_tqdm=True)):
|
| 32 |
-
print("start process_images")
|
| 33 |
progress(0, desc="Starting")
|
| 34 |
|
| 35 |
|
| 36 |
def process_img2img(image,prompt="a person",strength=0.75,seed=0,num_inference_steps=4):
|
| 37 |
-
print("start process_img2img")
|
| 38 |
if image == None:
|
| 39 |
print("empty input image returned")
|
| 40 |
return None
|
|
@@ -52,7 +50,7 @@ def process_images(image,prompt="a girl",strength=0.75,seed=0,inference_step=4,p
|
|
| 52 |
|
| 53 |
output = process_img2img(image,prompt,strength,seed,inference_step)
|
| 54 |
|
| 55 |
-
print("end process_images")
|
| 56 |
return output
|
| 57 |
|
| 58 |
|
|
|
|
| 5 |
|
| 6 |
import os
|
| 7 |
import numpy as np
|
|
|
|
|
|
|
| 8 |
import torch
|
| 9 |
from diffusers import FluxImg2ImgPipeline
|
| 10 |
|
|
|
|
| 27 |
|
| 28 |
@spaces.GPU(duration=120)
|
| 29 |
def process_images(image,prompt="a girl",strength=0.75,seed=0,inference_step=4,progress=gr.Progress(track_tqdm=True)):
|
| 30 |
+
#print("start process_images")
|
| 31 |
progress(0, desc="Starting")
|
| 32 |
|
| 33 |
|
| 34 |
def process_img2img(image,prompt="a person",strength=0.75,seed=0,num_inference_steps=4):
|
| 35 |
+
#print("start process_img2img")
|
| 36 |
if image == None:
|
| 37 |
print("empty input image returned")
|
| 38 |
return None
|
|
|
|
| 50 |
|
| 51 |
output = process_img2img(image,prompt,strength,seed,inference_step)
|
| 52 |
|
| 53 |
+
#print("end process_images")
|
| 54 |
return output
|
| 55 |
|
| 56 |
|