Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed):
|
|
38 |
torch.cuda.empty_cache()
|
39 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
40 |
pipe.enable_model_cpu_offload()
|
41 |
-
|
42 |
-
|
43 |
image = pipe(prompt=Prompt, guidance_scale=scale, num_images_per_prompt=1, num_inference_steps=steps, width=1024, height=1024,).images[0]
|
44 |
return image
|
45 |
|
|
|
38 |
torch.cuda.empty_cache()
|
39 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
40 |
pipe.enable_model_cpu_offload()
|
41 |
+
pipe.vae.enable_slicing()
|
42 |
+
pipe.vae.enable_tiling()
|
43 |
image = pipe(prompt=Prompt, guidance_scale=scale, num_images_per_prompt=1, num_inference_steps=steps, width=1024, height=1024,).images[0]
|
44 |
return image
|
45 |
|