Skip to content

Commit

Permalink
prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Mar 7, 2024
1 parent 20be071 commit 734e0b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
6 changes: 6 additions & 0 deletions app/creation_interfaces/kojii_chebel.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def kojii_chebel(request: KojiiChebelRequest, callback=None):
elif request.aspect_ratio == AspectRatio.landscape:
w, h = 1536, 1024
print("n3")
print(prompt)
control_image = random.choice(
control_images[request.number.value][request.aspect_ratio.value]
)
Expand All @@ -82,11 +83,16 @@ def kojii_chebel(request: KojiiChebelRequest, callback=None):
"steps": 42,
"seed": random.randint(0, 1000000),
}
print(config)

print("0-00")
print("n5")

image_url, thumbnail_url = replicate.sdxl(
config,
model_version="abraham-ai/eden-sd-pipelines-sdxl:a541eb2e611fc66ccd0faac634a7f7c0c7684977b7b54d0eb599ff352f343884"
)
print("n6")

return image_url, thumbnail_url

Expand Down
20 changes: 6 additions & 14 deletions app/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
NARRATOR_CHARACTER_ID = os.getenv("NARRATOR_CHARACTER_ID")

logosGenerators = [
"monologue", "dialogue", "story", "reel", "comic",
"monologue", "dialogue", "story", "reel",
"kojii/makeitrad", "kojii/va2rosa", "kojii/chebel", "kojii/untitledxyz", "kojii/violetforest", "kojii/huemin"
]

Expand Down Expand Up @@ -129,18 +129,6 @@ def send_progress_update(progress: float):
callback=send_progress_update
)

elif task_type == "comic":
character_id = request.config.get("characterId")
prompt = request.config.get("prompt")
task_req = ComicRequest(
character_id=character_id,
prompt=prompt,
)
output_url, thumbnail_url = illustrated_comic(
task_req,
callback=send_progress_update
)




Expand All @@ -152,6 +140,7 @@ def send_progress_update(progress: float):
clouds = request.config.get("clouds")
pool = request.config.get("pool")
aspect_ratio = request.config.get("aspect_ratio")
prompt = f"{setting} {location} {time} {color} {clouds} {pool} {aspect_ratio}"
task_req = KojiiMakeitradRequest(
setting=setting,
location=location,
Expand Down Expand Up @@ -189,6 +178,7 @@ def send_progress_update(progress: float):
aspect_ratio = request.config.get("aspect_ratio")
abstract = request.config.get("abstract")
color = request.config.get("color")
prompt = f"{number} {aspect_ratio} {abstract} {color}"
task_req = KojiiChebelRequest(
number=number,
aspect_ratio=aspect_ratio,
Expand All @@ -203,6 +193,7 @@ def send_progress_update(progress: float):
elif task_type == "kojii/untitledxyz":
type = request.config.get("type")
human_machine_nature = request.config.get("human_machine_nature")
prompt = f"{type} {human_machine_nature}"
task_req = KojiiUntitledxyzRequest(
type=type,
human_machine_nature=human_machine_nature,
Expand All @@ -215,7 +206,8 @@ def send_progress_update(progress: float):
elif task_type == "kojii/violetforest":
cybertwee_cyberpunk = request.config.get("cybertwee_cyberpunk")
style = request.config.get("style")
task_req = KoijiiVioletforestRequest(
prompt = f"{cybertwee_cyberpunk} {style}"
task_req = KojiiVioletforestRequest(
cybertwee_cyberpunk=cybertwee_cyberpunk,
style=style,
)
Expand Down

0 comments on commit 734e0b5

Please sign in to comment.