Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -450,8 +450,8 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
450 |
# precision data
|
451 |
|
452 |
seq=512
|
453 |
-
image_steps=
|
454 |
-
img_accu=
|
455 |
|
456 |
# ui data
|
457 |
|
@@ -513,7 +513,7 @@ function custom(){
|
|
513 |
# torch pipes
|
514 |
|
515 |
image_pipe = StableDiffusionPipeline.from_pretrained("emilianJR/epiCRealism", torch_dtype=dtype).to(device)
|
516 |
-
image_pipe.enable_model_cpu_offload()
|
517 |
|
518 |
torch.cuda.empty_cache()
|
519 |
|
@@ -1279,10 +1279,7 @@ def handle_generation(h,w,d):
|
|
1279 |
d = " ".join(d_lines)
|
1280 |
|
1281 |
d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
|
1282 |
-
if
|
1283 |
-
d = d if d == "" else summarize(translate(d))
|
1284 |
-
else:
|
1285 |
-
d = d if d == "" else translate(d)
|
1286 |
d = re.sub(r"([ \t]){1,}", " ", d)
|
1287 |
d = re.sub(r"(\. \.)", ".", d)
|
1288 |
|
|
|
450 |
# precision data
|
451 |
|
452 |
seq=512
|
453 |
+
image_steps=300
|
454 |
+
img_accu=7.5
|
455 |
|
456 |
# ui data
|
457 |
|
|
|
513 |
# torch pipes
|
514 |
|
515 |
image_pipe = StableDiffusionPipeline.from_pretrained("emilianJR/epiCRealism", torch_dtype=dtype).to(device)
|
516 |
+
#image_pipe.enable_model_cpu_offload()
|
517 |
|
518 |
torch.cuda.empty_cache()
|
519 |
|
|
|
1279 |
d = " ".join(d_lines)
|
1280 |
|
1281 |
d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
|
1282 |
+
d = d if d == "" else summarize(translate(d))
|
|
|
|
|
|
|
1283 |
d = re.sub(r"([ \t]){1,}", " ", d)
|
1284 |
d = re.sub(r"(\. \.)", ".", d)
|
1285 |
|