cleanup runner.py
This commit is contained in:
parent
b77113c9d2
commit
ba5da461e1
1 changed files with 7 additions and 30 deletions
|
|
@ -69,17 +69,14 @@ try:
|
||||||
image = Image.new('RGB', size, color='white')
|
image = Image.new('RGB', size, color='white')
|
||||||
"""
|
"""
|
||||||
|
|
||||||
"""
|
# Resulution Widescreen: 1344 x 768
|
||||||
# Current working...
|
# Portrait: 915 x 1144
|
||||||
pipe = DiffusionPipeline.from_pretrained("stablediffusionapi/juggernaut-xl-v8")
|
# Square: 1024 x 1024
|
||||||
pipe.to("cpu")
|
# Photo (4x3): 1182 x 886
|
||||||
|
|
||||||
image = pipe(
|
# Prompt weighting
|
||||||
prompt=prompt,
|
# prompt = "a red cat playing with a ball++"
|
||||||
# generator=torch.Generator(device="cpu").manual_seed(31),
|
# prompt = "a red------- cat playing with a ball"
|
||||||
negative_prompt=neg_prompt,
|
|
||||||
).images[0]
|
|
||||||
"""
|
|
||||||
|
|
||||||
base = DiffusionPipeline.from_pretrained(
|
base = DiffusionPipeline.from_pretrained(
|
||||||
"stablediffusionapi/juggernaut-xl-v8"
|
"stablediffusionapi/juggernaut-xl-v8"
|
||||||
|
|
@ -108,26 +105,6 @@ try:
|
||||||
).images[0]
|
).images[0]
|
||||||
image
|
image
|
||||||
|
|
||||||
# Resulution Widescreen: 1344 x 768
|
|
||||||
# Portrait: 915 x 1144
|
|
||||||
# Square: 1024 x 1024
|
|
||||||
# Photo (4x3): 1182 x 886
|
|
||||||
|
|
||||||
"""
|
|
||||||
pipe = StableDiffusionXLPipeline.from_pretrained(
|
|
||||||
"stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16
|
|
||||||
)
|
|
||||||
|
|
||||||
pipe = pipe.to("cpu")
|
|
||||||
|
|
||||||
prompt = "a photo of an astronaut riding a horse on mars"
|
|
||||||
|
|
||||||
image = pipe(prompt).images[0]
|
|
||||||
# prompt = "A cinematic shot of a baby racoon wearing an intricate italian priest robe."
|
|
||||||
|
|
||||||
# image = pipe(prompt=row['initial_prompt'], num_inference_steps=1, guidance_scale=0.0).images[0]
|
|
||||||
"""
|
|
||||||
|
|
||||||
img_uuid = str(uuid.uuid4())
|
img_uuid = str(uuid.uuid4())
|
||||||
file_name = '/app/images/' + img_uuid + '.png'
|
file_name = '/app/images/' + img_uuid + '.png'
|
||||||
# logging.debug(file_name)
|
# logging.debug(file_name)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue