Spaces:
Running
on
Zero
Running
on
Zero
please
Browse files
app.py
CHANGED
@@ -314,7 +314,7 @@ class customUnClipPipeline(UnCLIPImageVariationPipeline):
|
|
314 |
|
315 |
### ADDITIONAL PIPELINE CODE FOR KARLO
|
316 |
pipe = customUnClipPipeline.from_pretrained("kakaobrain/karlo-v1-alpha-image-variations", torch_dtype=torch.float16, trust_remote_code=True, accelerator='ort', device='cpu')
|
317 |
-
pipe.enable_model_cpu_offload()
|
318 |
|
319 |
|
320 |
# func for getting tensor embeddings from cand image
|
@@ -414,7 +414,7 @@ will_cand_tensors = torch.cat([chaosclicker_willtensor,
|
|
414 |
|
415 |
def generate_freak():
|
416 |
will_randomised_input = random_candtensor(will_cand_tensors).unsqueeze(0).half()
|
417 |
-
output = pipe(image_embeddings=will_randomised_input, num_images_per_prompt=1)
|
418 |
return output.images[0]
|
419 |
|
420 |
### GRADIO BACKEND
|
|
|
314 |
|
315 |
### ADDITIONAL PIPELINE CODE FOR KARLO
|
316 |
pipe = customUnClipPipeline.from_pretrained("kakaobrain/karlo-v1-alpha-image-variations", torch_dtype=torch.float16, trust_remote_code=True, accelerator='ort', device='cpu')
|
317 |
+
# pipe.enable_model_cpu_offload()
|
318 |
|
319 |
|
320 |
# func for getting tensor embeddings from cand image
|
|
|
414 |
|
415 |
def generate_freak():
|
416 |
will_randomised_input = random_candtensor(will_cand_tensors).unsqueeze(0).half()
|
417 |
+
output = pipe(image_embeddings=will_randomised_input, num_images_per_prompt=1, decoder_num_inference_steps = 20, super_res_num_inference_steps = 5)
|
418 |
return output.images[0]
|
419 |
|
420 |
### GRADIO BACKEND
|