Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,8 +3,11 @@ import spaces
|
|
| 3 |
import gradio as gr
|
| 4 |
from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline
|
| 5 |
|
| 6 |
-
prior_pipeline = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", variant="bf16", torch_dtype=torch.float16)
|
| 7 |
-
decoder_pipeline = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", variant="bf16", torch_dtype=torch.float16)
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
def generate(prompt, negative_prompt, width, height, steps):
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline
|
| 5 |
|
| 6 |
+
prior_pipeline = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", variant="bf16", torch_dtype=torch.float16)
|
| 7 |
+
decoder_pipeline = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", variant="bf16", torch_dtype=torch.float16)
|
| 8 |
+
|
| 9 |
+
prior_pipeline.enable_model_cpu_offload()
|
| 10 |
+
decoder_pipeline.enable_model_cpu_offload()
|
| 11 |
|
| 12 |
@spaces.GPU
|
| 13 |
def generate(prompt, negative_prompt, width, height, steps):
|