Spaces:
Running
on
Zero
Running
on
Zero
PLEASE
Browse files
app.py
CHANGED
@@ -313,7 +313,7 @@ class customUnClipPipeline(UnCLIPImageVariationPipeline):
|
|
313 |
|
314 |
|
315 |
### ADDITIONAL PIPELINE CODE FOR KARLO
|
316 |
-
pipe = customUnClipPipeline.from_pretrained("kakaobrain/karlo-v1-alpha-image-variations", torch_dtype=torch.
|
317 |
# pipe.enable_model_cpu_offload()
|
318 |
|
319 |
|
@@ -413,8 +413,8 @@ will_cand_tensors = torch.cat([chaosclicker_willtensor,
|
|
413 |
### FUNCTION FOR EXECUTION
|
414 |
|
415 |
def generate_freak():
|
416 |
-
will_randomised_input = random_candtensor(will_cand_tensors).unsqueeze(0)
|
417 |
-
output = pipe(image_embeddings=will_randomised_input, num_images_per_prompt=1, decoder_num_inference_steps =
|
418 |
return output.images[0]
|
419 |
|
420 |
### GRADIO BACKEND
|
|
|
313 |
|
314 |
|
315 |
### ADDITIONAL PIPELINE CODE FOR KARLO
|
316 |
+
pipe = customUnClipPipeline.from_pretrained("kakaobrain/karlo-v1-alpha-image-variations", torch_dtype=torch.float32, trust_remote_code=True, accelerator='ort', device='cpu')
|
317 |
# pipe.enable_model_cpu_offload()
|
318 |
|
319 |
|
|
|
413 |
### FUNCTION FOR EXECUTION
|
414 |
|
415 |
def generate_freak():
|
416 |
+
will_randomised_input = random_candtensor(will_cand_tensors).unsqueeze(0)
|
417 |
+
output = pipe(image_embeddings=will_randomised_input, num_images_per_prompt=1, decoder_num_inference_steps = 15, super_res_num_inference_steps = 4)
|
418 |
return output.images[0]
|
419 |
|
420 |
### GRADIO BACKEND
|