Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comfyui default deployment #42

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 33 additions & 12 deletions app/creation_interfaces/kojii_untitledxyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,46 +34,66 @@ def kojii_untitledxyz(request: KojiiUntitledxyzRequest, callback=None):

if request.type == Type.column:

if request.human_machine_nature < 0.5:
if request.human_machine_nature < 1 / 3:
text_inputs_to_interpolate = [
"close up of a single column, highly detailed, pen and ink, stone drawn with light yellow, orange, light brown, solid white background, sharpness, noise.",
"close up of a single column fragment, dense wires and thick electrical cables, computer circuits, corrosion, pen and ink, wires drawn with pale yellow, red, blue, green, solid white background, sharpness, noise.",
]
text_inputs_to_interpolate_weights = [
1 - 2 * request.human_machine_nature,
2 * request.human_machine_nature,
1 - 3 * request.human_machine_nature,
3 * request.human_machine_nature,
]

else:
elif request.human_machine_nature < 2 / 3:
text_inputs_to_interpolate = [
"close up of a single column fragment, dense wires and thick electrical cables, computer circuits, corrosion, pen and ink, wires drawn with pale yellow, red, blue, green, solid white background, sharpness, noise.",
"close up of a single column fragment, pen and ink, dense vegetation, wrapped in vines emerging from cracks, large leaves, dense lichen, diverse plants drawn with bright green, red, orange, blue, cyan, magenta, yellow, oversaturated, neons, solid white background, sharpness, noise.",
]
text_inputs_to_interpolate_weights = [
1 - 2 * (request.human_machine_nature - 0.5),
2 * (request.human_machine_nature - 0.5),
1 - 3 * (request.human_machine_nature - 1 / 3),
3 * (request.human_machine_nature - 1 / 3),
]

else:
text_inputs_to_interpolate = [
"close up of a single column fragment, pen and ink, dense vegetation, wrapped in vines emerging from cracks, large leaves, dense lichen, diverse plants drawn with bright green, red, orange, blue, cyan, magenta, yellow, oversaturated, neons, solid white background, sharpness, noise.",
"close up of a single column, highly detailed, pen and ink, stone drawn with light yellow, orange, light brown, solid white background, sharpness, noise.",
]
text_inputs_to_interpolate_weights = [
1 - 2 * (request.human_machine_nature - 2 / 3),
2 * (request.human_machine_nature - 2 / 3),
]

elif request.type == Type.context:

if request.human_machine_nature < 0.5:
if request.human_machine_nature < 1 / 3:
text_inputs_to_interpolate = [
"isometric architectural drawing, displaying an ultra close up of distorted roman columns connected to a modern building, emphasizing stone corinthian capitals and white blocks, pen and ink, yellow, orange, light brown, solid white background, sharpness, noise",
"an isometric architectural drawing, displaying an ultra close up of a modernist building made of computer parts, dodecahedrons, textural details, emphasizing entangled wires with intense precision, the intricate web of wires are seen up close, accentuating the fusion of modern and ancient, the image depicts wires illustrated with vibrant colors, sharpness, noise.",
]
text_inputs_to_interpolate_weights = [
1 - 2 * request.human_machine_nature,
2 * request.human_machine_nature,
1 - 3 * request.human_machine_nature,
3 * request.human_machine_nature,
]

else:
elif request.human_machine_nature < 2 / 3:
text_inputs_to_interpolate = [
"an isometric architectural drawing, displaying an ultra close up of a modernist building made of computer parts, dodecahedrons, textural details, emphasizing entangled wires with intense precision, the intricate web of wires are seen up close, accentuating the fusion of modern and ancient, the image depicts wires illustrated with vibrant colors, sharpness, noise.",
"an isometric architectural drawing, displaying an ultra close up of a modern superstructure, geometric stone blocks, emphasis on dense overwhelming vines with intense precision, plants are shot up close, accentuating the fusion of nature and columns, the image depicts giant leaves illustrated with vibrant colors, solid white background, sharpness, noise.",
]
text_inputs_to_interpolate_weights = [
1 - 2 * (request.human_machine_nature - 0.5),
2 * (request.human_machine_nature - 0.5),
1 - 3 * (request.human_machine_nature - 1 / 3),
3 * (request.human_machine_nature - 1 / 3),
]

else:
text_inputs_to_interpolate = [
"an isometric architectural drawing, displaying an ultra close up of a modern superstructure, geometric stone blocks, emphasis on dense overwhelming vines with intense precision, plants are shot up close, accentuating the fusion of nature and columns, the image depicts giant leaves illustrated with vibrant colors, solid white background, sharpness, noise.",
"isometric architectural drawing, displaying an ultra close up of distorted roman columns connected to a modern building, emphasizing stone corinthian capitals and white blocks, pen and ink, yellow, orange, light brown, solid white background, sharpness, noise",
]
text_inputs_to_interpolate_weights = [
1 - 3 * (request.human_machine_nature - 2 / 3),
3 * (request.human_machine_nature - 2 / 3),
]

config = {
Expand All @@ -86,6 +106,7 @@ def kojii_untitledxyz(request: KojiiUntitledxyzRequest, callback=None):
"lora": "https://edenartlab-prod-data.s3.us-east-1.amazonaws.com/d2e6d1f8ccfca428ba42fa56a0384a4261d32bf1ee8b0dc952d99da9011daf39.tar",
"lora_scale": 0.8,
"seed": seed,
"guidance_scale": 8.0,
}

print("CONFIG")
Expand Down
8 changes: 7 additions & 1 deletion app/plugins/replicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,13 @@ def txt2vid(
"n_frames": 100,
}

output = run_task(config, model_name="abraham-ai/eden-comfyui")
# default all comfyui jobs to deployment
model_deployment = "abraham-ai/eden-comfyui-images"

output = run_task(
config,
model_deployment=model_deployment,
)

output = list(output)
output_url = output[0]["files"][0]
Expand Down
Loading