Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import gradio as gr
|
|
| 5 |
import spaces
|
| 6 |
import numpy as np
|
| 7 |
import uuid
|
| 8 |
-
from optimum.quanto import freeze, qfloat8, quantize
|
| 9 |
from diffusers import PixArtAlphaPipeline, LCMScheduler
|
| 10 |
import torch
|
| 11 |
from typing import Tuple
|
|
@@ -79,8 +79,7 @@ pipe = PixArtAlphaPipeline.from_pretrained(
|
|
| 79 |
torch_dtype=torch.float16,
|
| 80 |
use_safetensors=True,
|
| 81 |
).to("cuda:0")
|
| 82 |
-
pipe.
|
| 83 |
-
quantize(pipe.transformer, weights=qint4, exclude="proj_out")
|
| 84 |
freeze(pipe.transformer)
|
| 85 |
|
| 86 |
def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
|
|
|
|
| 5 |
import spaces
|
| 6 |
import numpy as np
|
| 7 |
import uuid
|
| 8 |
+
from optimum.quanto import freeze, qfloat8, quantize
|
| 9 |
from diffusers import PixArtAlphaPipeline, LCMScheduler
|
| 10 |
import torch
|
| 11 |
from typing import Tuple
|
|
|
|
| 79 |
torch_dtype=torch.float16,
|
| 80 |
use_safetensors=True,
|
| 81 |
).to("cuda:0")
|
| 82 |
+
quantize(pipe.transformer, weights=qfloat8)
|
|
|
|
| 83 |
freeze(pipe.transformer)
|
| 84 |
|
| 85 |
def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
|