Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ pool = ProcessPoolExecutor(4)
|
|
16 |
pool.__enter__()
|
17 |
|
18 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
19 |
-
#model_id = "stabilityai/stable-diffusion-3-medium-diffusers"
|
20 |
model_id = "kandinsky-community/kandinsky-3"
|
|
|
21 |
|
22 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
23 |
if torch.cuda.is_available():
|
@@ -79,12 +79,12 @@ def Piper(_do):
|
|
79 |
width=768,
|
80 |
#negative_prompt='ugly, deformed, disfigured, poor details, bad anatomy, labels, texts, logos',
|
81 |
num_inference_steps=40,
|
82 |
-
guidance_scale=
|
83 |
)
|
84 |
|
85 |
def infer(prompt):
|
86 |
name = generate_random_string(12)+".png"
|
87 |
-
_do = f'
|
88 |
image = Piper(_do).images[0].save(name)
|
89 |
return name
|
90 |
|
|
|
16 |
pool.__enter__()
|
17 |
|
18 |
#model_id = "runwayml/stable-diffusion-v1-5"
|
|
|
19 |
model_id = "kandinsky-community/kandinsky-3"
|
20 |
+
#model_id = "stabilityai/stable-diffusion-3-medium-diffusers"
|
21 |
|
22 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
23 |
if torch.cuda.is_available():
|
|
|
79 |
width=768,
|
80 |
#negative_prompt='ugly, deformed, disfigured, poor details, bad anatomy, labels, texts, logos',
|
81 |
num_inference_steps=40,
|
82 |
+
guidance_scale=8.5
|
83 |
)
|
84 |
|
85 |
def infer(prompt):
|
86 |
name = generate_random_string(12)+".png"
|
87 |
+
_do = f'A minimal accurate { translate(prompt,"english") }, cold colors palette, muted colors, dynamic poze, realistic, realistic details, award winning photograph, soft natural lighting, deep field, natural, high definition, highly detailed, 8k'.lower()
|
88 |
image = Piper(_do).images[0].save(name)
|
89 |
return name
|
90 |
|