Spaces:
No application file
No application file
Update diffusion.py
Browse files- diffusion.py +3 -0
diffusion.py
CHANGED
|
@@ -10,6 +10,8 @@ def im_2_bytes(img_path):
|
|
| 10 |
return (im)
|
| 11 |
def gen_image(prompt,model_name="dreamlike-art/dreamlike-photoreal-2.0",count = 1):
|
| 12 |
proc=gr.load(f"models/{model_name}")
|
|
|
|
|
|
|
| 13 |
t=0
|
| 14 |
output_list=[]
|
| 15 |
while t<int(count):
|
|
@@ -18,5 +20,6 @@ def gen_image(prompt,model_name="dreamlike-art/dreamlike-photoreal-2.0",count =
|
|
| 18 |
inputs=f"{inputs} "
|
| 19 |
t+=1
|
| 20 |
#return(output_list)
|
|
|
|
| 21 |
return(im_2_bytes(output))
|
| 22 |
|
|
|
|
| 10 |
return (im)
|
| 11 |
def gen_image(prompt,model_name="dreamlike-art/dreamlike-photoreal-2.0",count = 1):
|
| 12 |
proc=gr.load(f"models/{model_name}")
|
| 13 |
+
output=proc(f'{prompt}')
|
| 14 |
+
'''
|
| 15 |
t=0
|
| 16 |
output_list=[]
|
| 17 |
while t<int(count):
|
|
|
|
| 20 |
inputs=f"{inputs} "
|
| 21 |
t+=1
|
| 22 |
#return(output_list)
|
| 23 |
+
'''
|
| 24 |
return(im_2_bytes(output))
|
| 25 |
|