Spaces:
Runtime error
Runtime error
Commit
Β·
3a331d7
1
Parent(s):
1cbf4b4
Uncommented line 157
Browse files
app.py
CHANGED
|
@@ -81,6 +81,7 @@ def transform_ncuda(img,prompt,cfg=8.0,stps=30,sc=0.8):
|
|
| 81 |
img2 = Image.open(io.BytesIO(artifact.binary))
|
| 82 |
return img2
|
| 83 |
except Exception as e:
|
|
|
|
| 84 |
print(f'Caught error: {e}')
|
| 85 |
logging.warn(f'Caught error: {e}')
|
| 86 |
|
|
@@ -148,7 +149,7 @@ except:
|
|
| 148 |
|
| 149 |
##################
|
| 150 |
def transform(init_image,prompt,n_prompt):
|
| 151 |
-
|
| 152 |
if cuda_error2==0:
|
| 153 |
try:
|
| 154 |
image1 = pipe1(prompt=prompt, image=init_image, negative_prompt=n_prompt, strength=0.8).images[0]
|
|
|
|
| 81 |
img2 = Image.open(io.BytesIO(artifact.binary))
|
| 82 |
return img2
|
| 83 |
except Exception as e:
|
| 84 |
+
|
| 85 |
print(f'Caught error: {e}')
|
| 86 |
logging.warn(f'Caught error: {e}')
|
| 87 |
|
|
|
|
| 149 |
|
| 150 |
##################
|
| 151 |
def transform(init_image,prompt,n_prompt):
|
| 152 |
+
init_image = init_image.resize((256,256), Image.ANTIALIAS)
|
| 153 |
if cuda_error2==0:
|
| 154 |
try:
|
| 155 |
image1 = pipe1(prompt=prompt, image=init_image, negative_prompt=n_prompt, strength=0.8).images[0]
|