Spaces:
Running
on
Zero
Running
on
Zero
prithivMLmods
commited on
Commit
•
d073466
1
Parent(s):
204b5b9
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,7 @@ import numpy as np
|
|
3 |
import random
|
4 |
import spaces
|
5 |
import torch
|
6 |
-
from diffusers import
|
7 |
-
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFast
|
8 |
from PIL import Image
|
9 |
import uuid
|
10 |
from typing import Tuple
|
@@ -12,7 +11,7 @@ from typing import Tuple
|
|
12 |
dtype = torch.bfloat16
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
|
15 |
-
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-
|
16 |
|
17 |
MAX_SEED = np.iinfo(np.int32).max
|
18 |
MAX_IMAGE_SIZE = 2048
|
@@ -192,7 +191,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
192 |
minimum=1,
|
193 |
maximum=50,
|
194 |
step=1,
|
195 |
-
value=
|
196 |
)
|
197 |
|
198 |
gr.Examples(
|
|
|
3 |
import random
|
4 |
import spaces
|
5 |
import torch
|
6 |
+
from diffusers import DiffusionPipeline
|
|
|
7 |
from PIL import Image
|
8 |
import uuid
|
9 |
from typing import Tuple
|
|
|
11 |
dtype = torch.bfloat16
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
|
14 |
+
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=dtype).to(device)
|
15 |
|
16 |
MAX_SEED = np.iinfo(np.int32).max
|
17 |
MAX_IMAGE_SIZE = 2048
|
|
|
191 |
minimum=1,
|
192 |
maximum=50,
|
193 |
step=1,
|
194 |
+
value=4,
|
195 |
)
|
196 |
|
197 |
gr.Examples(
|