Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,9 @@ import gradio as gr
|
|
38 |
from lxml.html import fromstring
|
39 |
from huggingface_hub import hf_hub_download
|
40 |
from safetensors.torch import load_file, save_file
|
41 |
-
from diffusers import
|
42 |
from PIL import Image, ImageDraw, ImageFont
|
43 |
-
from transformers import pipeline, T5ForConditionalGeneration, T5Tokenizer
|
44 |
from refiners.fluxion.utils import manual_seed
|
45 |
from refiners.foundationals.latent_diffusion import Solver, solvers
|
46 |
from refiners.foundationals.latent_diffusion.stable_diffusion_1.multi_upscaler import (
|
@@ -512,7 +512,7 @@ function custom(){
|
|
512 |
|
513 |
# torch pipes
|
514 |
|
515 |
-
image_pipe =
|
516 |
image_pipe.enable_model_cpu_offload()
|
517 |
|
518 |
torch.cuda.empty_cache()
|
|
|
38 |
from lxml.html import fromstring
|
39 |
from huggingface_hub import hf_hub_download
|
40 |
from safetensors.torch import load_file, save_file
|
41 |
+
from diffusers import StableDiffusionPipeline
|
42 |
from PIL import Image, ImageDraw, ImageFont
|
43 |
+
from transformers import pipeline, T5ForConditionalGeneration, T5Tokenizer
|
44 |
from refiners.fluxion.utils import manual_seed
|
45 |
from refiners.foundationals.latent_diffusion import Solver, solvers
|
46 |
from refiners.foundationals.latent_diffusion.stable_diffusion_1.multi_upscaler import (
|
|
|
512 |
|
513 |
# torch pipes
|
514 |
|
515 |
+
image_pipe = StableDiffusionPipeline.from_pretrained("emilianJR/epiCRealism", torch_dtype=dtype).to(device)
|
516 |
image_pipe.enable_model_cpu_offload()
|
517 |
|
518 |
torch.cuda.empty_cache()
|