Update app.py
Browse filesChanging it to image to image
app.py
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
gr.load("models/strangerzonehf/cinematicShot-Pics-Flux").launch()
|
|
|
1 |
+
import torch
|
2 |
+
from diffusers import AutoPipelineForImage2Image
|
3 |
+
from diffusers.utils import load_image, make_image_grid
|
4 |
+
|
5 |
+
pipeline = AutoPipelineForImage2Image.from_pretrained(
|
6 |
+
"kandinsky-community/kandinsky-2-2-decoder", torch_dtype=torch.float16, use_safetensors=True
|
7 |
+
)
|
8 |
+
pipeline.enable_model_cpu_offload()
|
9 |
+
# remove following line if xFormers is not installed or you have PyTorch 2.0 or higher installed
|
10 |
+
pipeline.enable_xformers_memory_efficient_attention()
|
11 |
import gradio as gr
|
12 |
|
13 |
gr.load("models/strangerzonehf/cinematicShot-Pics-Flux").launch()
|