Skip to content

A Claude Code plugin that turns a story into a finished anime

Ruby

Remove GPT Image 2.5 and keep 2.6 at high/high

Francesco 'makevoid' Canessa64d6b6425b6e
diff --git a/skills/make-an-anime/references/tasks.md b/skills/make-an-anime/references/tasks.md
index bb92968..9689d26 100644
--- a/skills/make-an-anime/references/tasks.md
+++ b/skills/make-an-anime/references/tasks.md
@@ -79,7 +79,7 @@ The music-video form remains available: song sections share one soundtrack.
```ruby
{
- # image_model: and edit_model: pin another image model, e.g. Fal::Models::GptImage25 and Fal::Models::GptImage25Edit.
+ # image_model: and edit_model: pin another image model, e.g. Fal::Models::NanoBanana2 and Fal::Models::NanoBanana2Edit.
"char-singer-v1" => { steps: [Steps::RefBase] },
"ep01-s01" => {
steps: [Steps::RefBase, Steps::Music, Steps::Keyframes, Steps::Clips, Steps::Overlay],
diff --git a/skills/make-an-anime/scripts/lib/fal/models/gpt_image25.rb b/skills/make-an-anime/scripts/lib/fal/models/gpt_image25.rb
deleted file mode 100644
index 0ee0914..0000000
--- a/skills/make-an-anime/scripts/lib/fal/models/gpt_image25.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-require_relative "base"
-
-module Fal
- module Models
- # https://fal.ai/models/openai/gpt-image-2.5/sunburst/text-to-image
- class GptImage25 < Base
- ENDPOINT = "openai/gpt-image-2.5/sunburst/text-to-image".freeze
- DEFAULTS = { quality: "xhigh", output_format: "png", num_images: 1 }.freeze
- # Explicit sizes (multiples of 16) matching nano-banana-2's 2K output, so generations compare 1:1.
- SIZES = { "16:9" => { width: 2752, height: 1536 } }.freeze
-
- # Same signature as NanoBanana2#generate; this endpoint has no seed param.
- def generate(prompt:, aspect_ratio: "16:9", seed: nil, **opts)
- call(prompt: prompt, image_size: SIZES.fetch(aspect_ratio), **opts)
- end
- end
- end
-end
diff --git a/skills/make-an-anime/scripts/lib/fal/models/gpt_image25_edit.rb b/skills/make-an-anime/scripts/lib/fal/models/gpt_image25_edit.rb
deleted file mode 100644
index 54c3842..0000000
--- a/skills/make-an-anime/scripts/lib/fal/models/gpt_image25_edit.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-require_relative "base"
-
-module Fal
- module Models
- # https://fal.ai/models/openai/gpt-image-2.5/sunburst/edit — new frames of an existing character (keyframes).
- class GptImage25Edit < Base
- ENDPOINT = "openai/gpt-image-2.5/sunburst/edit".freeze
- DEFAULTS = { quality: "xhigh", output_format: "png", num_images: 1 }.freeze
-
- def edit(prompt:, image_urls:, aspect_ratio: "16:9", **opts)
- call(prompt: prompt, image_urls: image_urls, image_size: GptImage25::SIZES.fetch(aspect_ratio), **opts)
- end
- end
- end
-end
diff --git a/skills/make-an-anime/scripts/lib/fal/models/gpt_image26.rb b/skills/make-an-anime/scripts/lib/fal/models/gpt_image26.rb
index 3cf9968..004a04c 100644
--- a/skills/make-an-anime/scripts/lib/fal/models/gpt_image26.rb
+++ b/skills/make-an-anime/scripts/lib/fal/models/gpt_image26.rb
@@ -1,5 +1,4 @@
require_relative "base"
-require_relative "gpt_image25"
module Fal
module Models
@@ -9,9 +8,10 @@ module Fal
class GptImage26 < Base
ENDPOINT = "openai/gpt-image-2.6/sunburst/text-to-image".freeze
DEFAULTS = { quality: "high", reasoning_effort: "high", output_format: "png", num_images: 1 }.freeze
- SIZES = GptImage25::SIZES
+ # Explicit sizes (multiples of 16) matching nano-banana-2's 2K output, so generations compare 1:1.
+ SIZES = { "16:9" => { width: 2752, height: 1536 } }.freeze
- # Same signature as GptImage25#generate; this endpoint has no seed param.
+ # Same signature as NanoBanana2#generate; this endpoint has no seed param.
def generate(prompt:, aspect_ratio: "16:9", seed: nil, **opts)
call(prompt: prompt, image_size: SIZES.fetch(aspect_ratio), **opts)
end
diff --git a/skills/make-an-anime/scripts/lib/pipeline/steps/keyframes.rb b/skills/make-an-anime/scripts/lib/pipeline/steps/keyframes.rb
index 09107f3..59cba7a 100644
--- a/skills/make-an-anime/scripts/lib/pipeline/steps/keyframes.rb
+++ b/skills/make-an-anime/scripts/lib/pipeline/steps/keyframes.rb
@@ -4,7 +4,7 @@ module Pipeline
# prompts/<run>/02_keyframes.yml { name => edit prompt }, each sent with the ref_base image to gpt-image-2.6/edit.
# A spec can also be { "prompt" => ..., "refs" => [run, ...] } to add other runs' ref_base images (a second character):
# image_urls = [this run's ref_base, *those], so the prompt can say "the character in the second image".
- # Generation option edit_model: Fal::Models::GptImage25Edit paints the keyframes with another image model.
+ # Generation option edit_model: Fal::Models::NanoBanana2Edit paints the keyframes with another image model.
# "base" => <keyframe name> edits an earlier keyframe of this list instead of ref_base (same framing, new pose),
# "base" => false sends only the refs (a keyframe without the singer), "base" => "<run>/<keyframe>" edits another run's keyframe.
class Keyframes < ItemsStep
diff --git a/skills/make-an-anime/scripts/lib/pipeline/steps/ref_base.rb b/skills/make-an-anime/scripts/lib/pipeline/steps/ref_base.rb
index 71f40ff..50e13bb 100644
--- a/skills/make-an-anime/scripts/lib/pipeline/steps/ref_base.rb
+++ b/skills/make-an-anime/scripts/lib/pipeline/steps/ref_base.rb
@@ -1,7 +1,7 @@
module Pipeline
module Steps
# Step 1 — the singer reference frame (text-to-image, prompt = prompts/<run>/01_ref_base.*).
- # GPT Image 2.6 unless the generation sets image_model: (or edit_model: for photos and edit_from), e.g. Fal::Models::GptImage25.
+ # GPT Image 2.6 unless the generation sets image_model: (or edit_model: for photos and edit_from), e.g. Fal::Models::NanoBanana2.
class RefBase < Step
MODEL = Fal::Models::GptImage26
diff --git a/skills/make-an-anime/scripts/spec/core_spec.rb b/skills/make-an-anime/scripts/spec/core_spec.rb
index 920c5e5..9da1693 100644
--- a/skills/make-an-anime/scripts/spec/core_spec.rb
+++ b/skills/make-an-anime/scripts/spec/core_spec.rb
@@ -149,9 +149,9 @@ RSpec.describe "Fal HTTP and model contracts", :core do
Excon.stub({method: :get, path: "/status"}, {status: 200, body: '{"status":"COMPLETED"}'})
Excon.stub({method: :get, path: "/result"}, {status: 200, body: '{"images":[{"url":"https://cdn.test/image.png"}]}'})
client = Fal::Client.new(api_key: "test-only", poll_interval: 0)
- 2.times { expect(Fal::Models::GptImage25.new(client: client).generate(prompt: "fixture").request_id).to eq("job-1") }
+ 2.times { expect(Fal::Models::GptImage26.new(client: client).generate(prompt: "fixture").request_id).to eq("job-1") }
expect(submitted.size).to eq(1)
- expect(submitted.first).to include("quality" => "xhigh", "output_format" => "png")
+ expect(submitted.first).to include("quality" => "high", "reasoning_effort" => "high", "output_format" => "png")
expect(Dir["output/requests/*.json"].size).to eq(1)
end
end