Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import gradio as gr
|
|
| 7 |
import numpy as np
|
| 8 |
import random
|
| 9 |
#from diffusers import DiffusionPipeline
|
| 10 |
-
from diffusers import StableDiffusionXLPipeline,
|
| 11 |
from huggingface_hub import hf_hub_download
|
| 12 |
|
| 13 |
|
|
@@ -34,9 +34,13 @@ pipe.to('cuda')
|
|
| 34 |
pipe.load_lora_weights(hf_hub_download(repo_name, ckpt_name))
|
| 35 |
pipe.fuse_lora()
|
| 36 |
# Ensure ddim scheduler timestep spacing set as trailing !!!
|
| 37 |
-
pipe.scheduler =
|
| 38 |
# lower eta results in more detail
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
prompt = "1girl, solo, upper body, v, smile, looking at viewer, outdoors, night, masterpiece, best quality, very aesthetic, absurdres"
|
| 41 |
negative_prompt = "(worst quality),(low quality),lowres,(bad anatomy),(deformed anatomy),(deformed fingers),(blurry),(extra finger),(extra arms), (extra legs),(monochrome:1.4),(grayscale:1.4),((watermark)),(overweight female:1.6),((pointy ears)),mascot,stuffed human, stuffed animal,chibi,english text, chinese text, korean text"
|
| 42 |
|
|
|
|
| 7 |
import numpy as np
|
| 8 |
import random
|
| 9 |
#from diffusers import DiffusionPipeline
|
| 10 |
+
from diffusers import StableDiffusionXLPipeline, TCDScheduler
|
| 11 |
from huggingface_hub import hf_hub_download
|
| 12 |
|
| 13 |
|
|
|
|
| 34 |
pipe.load_lora_weights(hf_hub_download(repo_name, ckpt_name))
|
| 35 |
pipe.fuse_lora()
|
| 36 |
# Ensure ddim scheduler timestep spacing set as trailing !!!
|
| 37 |
+
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)
|
| 38 |
# lower eta results in more detail
|
| 39 |
|
| 40 |
+
pipe.load_lora_weights(repo_name)
|
| 41 |
+
pipe.fuse_lora()
|
| 42 |
+
|
| 43 |
+
|
| 44 |
prompt = "1girl, solo, upper body, v, smile, looking at viewer, outdoors, night, masterpiece, best quality, very aesthetic, absurdres"
|
| 45 |
negative_prompt = "(worst quality),(low quality),lowres,(bad anatomy),(deformed anatomy),(deformed fingers),(blurry),(extra finger),(extra arms), (extra legs),(monochrome:1.4),(grayscale:1.4),((watermark)),(overweight female:1.6),((pointy ears)),mascot,stuffed human, stuffed animal,chibi,english text, chinese text, korean text"
|
| 46 |
|