Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ FTP_PASS = os.getenv("FTP_PASS")
|
|
39 |
FTP_DIR = "1ink.us/stable_diff/" # Remote directory on FTP server
|
40 |
|
41 |
DESCRIPTIONXX = """
|
42 |
-
## ⚡⚡⚡⚡ REALVISXL V5.0 BF16 (Tester
|
43 |
"""
|
44 |
|
45 |
examples = [
|
@@ -160,16 +160,14 @@ def save_image(img):
|
|
160 |
return unique_name
|
161 |
|
162 |
def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
|
163 |
-
filename= f'
|
164 |
with open(filename, "w") as f:
|
165 |
-
f.write(f"Realvis 5.0 (Tester
|
166 |
f.write(f"Date/time: {timestamp} \n")
|
167 |
f.write(f"Prompt: {prompt} \n")
|
168 |
f.write(f"Steps: {num_inference_steps} \n")
|
169 |
f.write(f"Guidance Scale: {guidance_scale} \n")
|
170 |
f.write(f"SPACE SETUP: \n")
|
171 |
-
f.write(f"Use Model Dtype: no \n")
|
172 |
-
f.write(f"Model Scheduler: Euler_a all_custom before cuda \n")
|
173 |
f.write(f"To cuda and bfloat \n")
|
174 |
upload_to_ftp(filename)
|
175 |
|
@@ -208,7 +206,7 @@ def generate_30(
|
|
208 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
209 |
batch_options = options.copy()
|
210 |
rv_image = pipe(**batch_options).images[0]
|
211 |
-
sd_image_path = f"
|
212 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
213 |
upload_to_ftp(sd_image_path)
|
214 |
unique_name = str(uuid.uuid4()) + ".png"
|
@@ -250,7 +248,7 @@ def generate_60(
|
|
250 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
251 |
batch_options = options.copy()
|
252 |
rv_image = pipe(**batch_options).images[0]
|
253 |
-
sd_image_path = f"
|
254 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
255 |
upload_to_ftp(sd_image_path)
|
256 |
unique_name = str(uuid.uuid4()) + ".png"
|
@@ -292,7 +290,7 @@ def generate_90(
|
|
292 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
293 |
batch_options = options.copy()
|
294 |
rv_image = pipe(**batch_options).images[0]
|
295 |
-
sd_image_path = f"
|
296 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
297 |
upload_to_ftp(sd_image_path)
|
298 |
unique_name = str(uuid.uuid4()) + ".png"
|
@@ -467,9 +465,6 @@ with gr.Blocks(theme=gr.themes.Origin(),css=css) as demo:
|
|
467 |
gr.Markdown("### REALVISXL V5.0")
|
468 |
predefined_gallery = gr.Gallery(label="REALVISXL V5.0", columns=3, show_label=False, value=load_predefined_images1())
|
469 |
|
470 |
-
#gr.Markdown("### LIGHTNING V5.0")
|
471 |
-
#predefined_gallery = gr.Gallery(label="LIGHTNING V5.0", columns=3, show_label=False, value=load_predefined_images())
|
472 |
-
|
473 |
gr.Markdown(
|
474 |
"""
|
475 |
<div style="text-align: justify;">
|
|
|
39 |
FTP_DIR = "1ink.us/stable_diff/" # Remote directory on FTP server
|
40 |
|
41 |
DESCRIPTIONXX = """
|
42 |
+
## ⚡⚡⚡⚡ REALVISXL V5.0 BF16 (Tester F) ⚡⚡⚡⚡
|
43 |
"""
|
44 |
|
45 |
examples = [
|
|
|
160 |
return unique_name
|
161 |
|
162 |
def uploadNote(prompt,num_inference_steps,guidance_scale,timestamp):
|
163 |
+
filename= f'tst_F_{timestamp}.txt'
|
164 |
with open(filename, "w") as f:
|
165 |
+
f.write(f"Realvis 5.0 (Tester F) \n")
|
166 |
f.write(f"Date/time: {timestamp} \n")
|
167 |
f.write(f"Prompt: {prompt} \n")
|
168 |
f.write(f"Steps: {num_inference_steps} \n")
|
169 |
f.write(f"Guidance Scale: {guidance_scale} \n")
|
170 |
f.write(f"SPACE SETUP: \n")
|
|
|
|
|
171 |
f.write(f"To cuda and bfloat \n")
|
172 |
upload_to_ftp(filename)
|
173 |
|
|
|
206 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
207 |
batch_options = options.copy()
|
208 |
rv_image = pipe(**batch_options).images[0]
|
209 |
+
sd_image_path = f"rv50_F_{timestamp}.png"
|
210 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
211 |
upload_to_ftp(sd_image_path)
|
212 |
unique_name = str(uuid.uuid4()) + ".png"
|
|
|
248 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
249 |
batch_options = options.copy()
|
250 |
rv_image = pipe(**batch_options).images[0]
|
251 |
+
sd_image_path = f"rv50_F_{timestamp}.png"
|
252 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
253 |
upload_to_ftp(sd_image_path)
|
254 |
unique_name = str(uuid.uuid4()) + ".png"
|
|
|
290 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
291 |
batch_options = options.copy()
|
292 |
rv_image = pipe(**batch_options).images[0]
|
293 |
+
sd_image_path = f"rv50_F_{timestamp}.png"
|
294 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
295 |
upload_to_ftp(sd_image_path)
|
296 |
unique_name = str(uuid.uuid4()) + ".png"
|
|
|
465 |
gr.Markdown("### REALVISXL V5.0")
|
466 |
predefined_gallery = gr.Gallery(label="REALVISXL V5.0", columns=3, show_label=False, value=load_predefined_images1())
|
467 |
|
|
|
|
|
|
|
468 |
gr.Markdown(
|
469 |
"""
|
470 |
<div style="text-align: justify;">
|