Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +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 live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_call_that_returns_an_iterable_of_images
|
| 9 |
|
|
@@ -13,7 +13,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
| 13 |
|
| 14 |
|
| 15 |
# Load the model pipeline
|
| 16 |
-
pipe =
|
| 17 |
|
| 18 |
torch.cuda.empty_cache()
|
| 19 |
|
|
|
|
| 3 |
import random
|
| 4 |
import spaces
|
| 5 |
import torch
|
| 6 |
+
from diffusers import DiffusionPipeline
|
| 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 |
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
# Load the model pipeline
|
| 16 |
+
pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image", torch_dtype=dtype).to(device)
|
| 17 |
|
| 18 |
torch.cuda.empty_cache()
|
| 19 |
|