Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,15 @@ import torch
|
|
6 |
from diffusers import DiffusionPipeline, FlowMatchEulerDiscreteScheduler, AutoencoderTiny, AutoencoderKL
|
7 |
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFast
|
8 |
from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_call_that_returns_an_iterable_of_images
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
dtype = torch.bfloat16
|
11 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
6 |
from diffusers import DiffusionPipeline, FlowMatchEulerDiscreteScheduler, AutoencoderTiny, AutoencoderKL
|
7 |
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFast
|
8 |
from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_call_that_returns_an_iterable_of_images
|
9 |
+
from diffusers import DiffusionPipeline
|
10 |
+
|
11 |
+
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev")
|
12 |
+
|
13 |
+
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
|
14 |
+
image = pipe(prompt).images[0]
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
|
19 |
dtype = torch.bfloat16
|
20 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|