Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,7 @@ tokenizer_1 = CLIPTokenizer.from_pretrained('ford442/RealVisXL_V5.0_BF16', low_c
|
|
89 |
tokenizer_2 = CLIPTokenizer.from_pretrained('ford442/RealVisXL_V5.0_BF16', low_cpu_mem_usage=False, subfolder='tokenizer_2', token=True)
|
90 |
scheduler = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', low_cpu_mem_usage=False, subfolder='scheduler', token=True)
|
91 |
vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", low_cpu_mem_usage=False, safety_checker=None, use_safetensors=False, torch_dtype=torch.float32, token=True) #.to(device).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
92 |
-
unet = UNet2DConditionModel.from_pretrained("
|
93 |
|
94 |
def load_and_prepare_model():
|
95 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
@@ -204,7 +204,7 @@ def generate_30(
|
|
204 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
205 |
batch_options = options.copy()
|
206 |
rv_image = pipe(**batch_options).images[0]
|
207 |
-
sd_image_path = f"
|
208 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
209 |
upload_to_ftp(sd_image_path)
|
210 |
unique_name = str(uuid.uuid4()) + ".png"
|
@@ -246,7 +246,7 @@ def generate_60(
|
|
246 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
247 |
batch_options = options.copy()
|
248 |
rv_image = pipe(**batch_options).images[0]
|
249 |
-
sd_image_path = f"
|
250 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
251 |
upload_to_ftp(sd_image_path)
|
252 |
unique_name = str(uuid.uuid4()) + ".png"
|
@@ -288,7 +288,7 @@ def generate_90(
|
|
288 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
289 |
batch_options = options.copy()
|
290 |
rv_image = pipe(**batch_options).images[0]
|
291 |
-
sd_image_path = f"
|
292 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
293 |
upload_to_ftp(sd_image_path)
|
294 |
unique_name = str(uuid.uuid4()) + ".png"
|
|
|
89 |
tokenizer_2 = CLIPTokenizer.from_pretrained('ford442/RealVisXL_V5.0_BF16', low_cpu_mem_usage=False, subfolder='tokenizer_2', token=True)
|
90 |
scheduler = EulerAncestralDiscreteScheduler.from_pretrained('ford442/RealVisXL_V5.0_BF16', low_cpu_mem_usage=False, subfolder='scheduler', token=True)
|
91 |
vaeXL = AutoencoderKL.from_pretrained("stabilityai/sdxl-vae", low_cpu_mem_usage=False, safety_checker=None, use_safetensors=False, torch_dtype=torch.float32, token=True) #.to(device).to(torch.bfloat16) #.to(device=device, dtype=torch.bfloat16)
|
92 |
+
unet = UNet2DConditionModel.from_pretrained("ford442/RealVisXL_V5.0_BF16", low_cpu_mem_usage=False, subfolder='unet', token=True)
|
93 |
|
94 |
def load_and_prepare_model():
|
95 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
|
|
204 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
205 |
batch_options = options.copy()
|
206 |
rv_image = pipe(**batch_options).images[0]
|
207 |
+
sd_image_path = f"rv50_G_{timestamp}.png"
|
208 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
209 |
upload_to_ftp(sd_image_path)
|
210 |
unique_name = str(uuid.uuid4()) + ".png"
|
|
|
246 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
247 |
batch_options = options.copy()
|
248 |
rv_image = pipe(**batch_options).images[0]
|
249 |
+
sd_image_path = f"rv50_G_{timestamp}.png"
|
250 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
251 |
upload_to_ftp(sd_image_path)
|
252 |
unique_name = str(uuid.uuid4()) + ".png"
|
|
|
288 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
289 |
batch_options = options.copy()
|
290 |
rv_image = pipe(**batch_options).images[0]
|
291 |
+
sd_image_path = f"rv50_G_{timestamp}.png"
|
292 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
293 |
upload_to_ftp(sd_image_path)
|
294 |
unique_name = str(uuid.uuid4()) + ".png"
|