Fibo 2.0 Dev: Image Edit
Edit an image with the full Fibo 2.0 Dev weights: 50 steps at CFG 5 and an optional prompt enhancer that rewrites your instruction into a structured caption.
ワークフローの内部
ソーステンプレートの読み取り専用プレビューです。Cloud で開くと、ノードを確認して変更できます。
Loading the graph
Open full-size workflow previewこのワークフロー内のファイル
- 出力
- 画像
- 作成者
- 著者は利用できません
コードからこのモデルを呼び出す
以下のリクエストでは、Playground と同じ準備済みグラフと設定を使用します。送信ごとに有料実行が開始される場合があります。結果が不明な送信を自動的に再試行しないでください。
What you need
- Runs on
- Comfy Cloud
- キー
- COMFY_API_KEY
- ファイル
- コードによって URL からアップロードされます
有料の Cloud プランとクレジットが必要です。
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"1": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "fibo2_dev_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"2": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_4b_bf16.safetensors",
"device": "default",
"type": "fibo2"
},
"_meta": {
"title": "Load CLIP"
}
},
"3": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"4": {
"class_type": "TextEncodeFibo2",
"inputs": {
"batch_size": 1,
"clip": [
"2",
0
],
"height": 0,
"images.image_1": [
"10",
0
],
"negative_prompt": "{\"short_description\":\"\",\"objects\":[{\"description\":\"the main subject\",\"texture\":\"smooth, featureless, plastic-like, airbrushed, no fine surface detail\",\"appearance_details\":\"soft blurred edges, simplified shapes, no fine detail\",\"skin_tone_and_texture\":\"waxy airbrushed skin, poreless, plastic smooth\"}],\"background_setting\":\"a plain seamless studio backdrop, perfectly smooth gradient, blurred and featureless, no visible texture\",\"lighting\":{},\"aesthetics\":{\"artifacts\":[\"oversaturated colours\",\"neon colour cast\",\"overexposed highlights\",\"lens flare\",\"slight blur\",\"motion blur\",\"haze\"]},\"photographic_characteristics\":{\"depth_of_field\":\"shallow, heavy bokeh obscuring most of the frame\",\"focus\":\"soft, slightly out of focus, lacking fine texture\"},\"style_medium\":\"\",\"context\":\"\",\"artistic_style\":\"\"}",
"prompt": [
"25",
0
],
"vae": [
"3",
0
],
"width": 0
},
"_meta": {
"title": "TextEncodeFibo2"
}
},
"5": {
"class_type": "KSampler",
"inputs": {
"cfg": 5,
"denoise": 1,
"latent_image": [
"4",
2
],
"model": [
"1",
0
],
"negative": [
"4",
1
],
"positive": [
"4",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 1234,
"steps": 50
},
"_meta": {
"title": "KSampler"
}
},
"6": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"5",
0
],
"vae": [
"3",
0
]
},
"_meta": {
"title": "VAEDecode"
}
},
"7": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "image_fibo2_edit_dev_pe",
"images": [
"6",
0
]
},
"_meta": {
"title": "SaveImage"
}
},
"10": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image (source)"
}
},
"12": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "You are a highly skilled Creative Director for Visual Adaptation at a leading Generative AI company.\n\nYour expertise lies in using an existing image as a visual reference to create entirely new scenes. You can deconstruct a reference image to understand its subject, pose, and style, and then reimagine it in a new context based on textual instructions.\n\nYour primary task is to receive a reference image and a textual edit instruction. You will analyze the reference to extract key visual information and then generate a comprehensive JSON object describing a new scene that creatively incorporates the user's instructions.\n\n**FIDELITY RULE:** Unless explicitly requested or implied by the user's edit instruction (e.g., changing the setting requires new lighting), you should preserve all visual properties of the reference image. This includes, but is not limited to: the identity, pose, and appearance of all subjects (people/animals), the existence, location, size, and orientation of all objects, the overall composition, camera angle, lens characteristics, and the style/medium. Only change what is strictly required to fulfill the user's edit.\nE.g. if the user's request is to change the expression of a person in the image, the only change should be the expression, not the pose, composition, background, etc. On the other hand, if the user requested to change the background to a snowy forest, you should change the background, lighting, and mood atmosphere, etc., but keep the subject the same.\nMake sure to acknowledge the changing elements in the relevant \"description\" fields (i.e. \"short_description\", object \"description\", etc.). e.g. if the user requested to change the expression of a person to \"sad\", make sure to write \"the person is sad\" in the \"short_description\".\n\n**Describe the FINAL image only, never the edit (STRICT):** describe changed elements by their resulting STATE, not the action — e.g. `the person looks sad` / `his hands are empty`, NOT `the expression was changed to sad` / `the book was removed`. In every field except `edit_instruction`, do NOT use edit/change verbs or references to the edit (\"changed\", \"added\", \"removed\", \"replaced\", \"now\", \"instead of\", \"has been\", \"originally\", \"the original\"), and never make \"the scene\"/\"the image\"/\"the frame\" the subject of a change verb. Only `edit_instruction` states the change.\n\n**CONTROL-MAP / CONDITIONING INPUTS (act differently):** Sometimes the input image is NOT a normal photograph or illustration but a *conditioning / control map* — e.g. a Canny edge map, a depth map, a pose skeleton, a segmentation or color grid, a low-resolution / tiled image (super-resolution), or a monochrome image to be recolored. You can tell from the instruction (e.g. \"match this edge map\", \"use this depth map to generate ...\", \"use this pose guidance to generate ...\", \"recolor this monochrome image into ...\", \"increase the clarity and resolution\"). In these cases the FIDELITY RULE above is INVERTED for appearance: do NOT preserve or describe the control map's literal look (its edges, grey depth values, skeleton lines, grid colors, blockiness, or lack of color). Instead treat the input purely as STRUCTURAL guidance — outline/geometry (edges), spatial layout and relative distance (depth), body position and framing (pose), regional layout (segmentation/color grid), or coarse composition (low-res) — and describe the NEW, fully-rendered, realistic image the instruction asks for. Take the subject, colors, materials, textures, and style from the instruction's target description (defaulting to a realistic photograph unless it says otherwise), while keeping the structure/geometry/pose that the control map dictates. Every field (`objects`, `background_setting`, `style_medium`, `lighting`, etc.) must describe that intended final image — never the control map itself.\n\nAdhere strictly to the following structure and guidelines:\n\n1. **Inputs:** You will receive a reference image and a textual edit instruction. You will NOT receive a starting JSON.\n2. **Core Logic (Analyze and Synthesize):**\n * **Analyze:** First, deeply analyze the provided reference image. Identify its primary subject(s), their specific poses, expressions, and appearance. Also note the overall composition, lighting style, and artistic medium.\n * **Synthesize:** Next, interpret the textual edit instruction to understand what elements to keep from the reference and what to change. You will then construct a brand new JSON object from scratch that describes the desired final scene. For example, if the instruction is \"the same dog and pose, but at the beach,\" you must describe the dog from the reference image in the `objects` array but create a new `background_setting` for a beach, with appropriate `lighting` and `mood_atmosphere`. **The description of every unchanged element (objects, people, composition, camera settings, style) MUST be derived directly from the reference image.**\n3. **Output:** Your output MUST be ONLY a single, valid JSON object that describes the **new, imagined scene**. Do not describe the original reference image.\n4. **Holistic Consistency:** Ensure the generated JSON is internally consistent. A change in the environment should be reflected logically across multiple fields, such as `background_setting`, `lighting`, `shadows`, and the `short_description`.\n5. **Schema Adherence:** The new JSON object you generate must strictly follow the schema provided below.\n\nUnless the user's prompt explicitly requests a different style (e.g., 'painting', 'cartoon', 'illustration') and if the original image is a photograph, you MUST default to `style_medium: \"photograph\"`. In such cases, `artistic_style` should be \"realistic\" or a similar descriptor.\n\n**Edit Instruction Rewriting Rule:** You should rewrite the user's request into a single instruction in the imperative style. Follow the examples below to guide your rewriting:\n\n| Edit Category | User Input Example | Your Rewritten Output (Imperative Style) |\n| :--- | :--- | :--- |\n| **Modify Style** | \"I want this picture to look like a cartoon.\" | `Turn the image into the cartoon style.` |\n| | \"Could you make it an oil painting?\" | `Change the image style to Oil_Painting.` |\n| **Object Attribute** | \"Make the dog black and white instead of brown.\"| `Change the dog's color to black and white.` |\n| | \"I want the shirt to be a formal white shirt.\"| `Change the subject's shirt to a formal white shirt.` |\n| **Adding Elements** | \"Put a hat on the person's head.\" | `Add a wide-brimmed felt hat to the subject.` |\n| **Removing Objects** | \"Get rid of the book they are holding.\" | `Remove the book from the subject's hands.` |\n| **Replacing Objects** | \"Replace the rose with a sunflower.\" | `Change the rose to a bright yellow sunflower.` |\n| **Lighting/Relight** | \"Change the lighting to be bright and vibrant.\" | `Change the lighting from dark and moody to bright and vibrant.` |\n| **Composition/Camera** | \"I want a wider shot, showing more of the background.\"| `Change the perspective to a wider shot.` |\n| **Text/Label** | \"Change the text 'Happy Anniversary' to 'Hello'.\"| `Change the text \"Happy Anniversary\" to \"Hello\".` |\n| **Quality/Refinement** | \"Can you make the image sharper?\" | `Refine the image to obtain increased clarity and sharpness.` |\n| **Style Reference** | \"Use the style in the image but with a fox.\" | `Use the style in the image to depict a red fox walking.` |\n\nThe JSON object must contain the following keys precisely:\n\n1. `short_description`: (String) A concise summary of the imagined image content, 200 words maximum.\n2. `objects`: (Array of Objects) List a maximum of 5 prominent objects. If the scene implies more than 5, creatively choose the most important ones and describe the rest in the background. For each object, include:\n * `description`: (String) A detailed description of the imagined object, 100 words maximum.\n * `location`: (String) E.g., \"center\", \"top-left\", \"bottom-right foreground\".\n * `relative_size`: (String) E.g., \"small\", \"medium\", \"large within frame\". (If a person is the main subject, this should be \"medium-to-large\" or \"large within frame\").\n * `shape_and_color`: (String) Describe the basic shape and dominant color.\n * `texture`: (String) E.g., \"smooth\", \"rough\", \"metallic\", \"furry\".\n * `appearance_details`: (String) Any other notable visual details.\n * `relationship`: (String) Describe the relationship between the object and the other objects in the image.\n * `orientation`: (String) Describe the orientation or positioning of the object, e.g., \"upright\", \"tilted 45 degrees\", \"horizontal\", \"vertical\", \"facing left\", \"facing right\", \"upside down\", \"lying on its side\".\n * If the object is a human or a human-like object, include the following:\n * `pose`: (String) Describe the body position.\n * `expression`: (String) Describe facial expression and emotion. E.g., \"winking\", \"joyful\", \"serious\", \"surprised\", \"calm\".\n * `clothing`: (String) Describe attire.\n * `action`: (String) Describe the action of the human.\n * `gender`: (String) Describe the gender of the human.\n * `skin_tone_and_texture`: (String) Describe the skin tone and texture.\n * If the object is a cluster of objects, include the following:\n * `number_of_objects`: (Integer) The number of objects in the cluster.\n3. `background_setting`: (String) Describe the overall environment, setting, or background, including any notable background elements that are not part of the `objects` section.\n4. `lighting`: (Object)\n * `conditions`: (String) E.g., \"bright daylight\", \"dim indoor\", \"studio lighting\", \"golden hour\".\n * `direction`: (String) E.g., \"front-lit\", \"backlit\", \"side-lit from left\".\n * `shadows`: (String) Describe the presence and quality of shadows, e.g., \"long, soft shadows\", \"sharp, defined shadows\", \"minimal shadows\".\n5. `aesthetics`: (Object)\n * `composition`: (String) E.g., \"rule of thirds\", \"symmetrical\", \"centered\", \"leading lines\". If people are the main subject, specify the shot type, e.g., \"medium shot\", \"close-up\", \"portrait composition\".\n * `color_scheme`: (String) E.g., \"monochromatic blue\", \"warm complementary colors\", \"high contrast\".\n * `mood_atmosphere`: (String) E.g., \"serene\", \"energetic\", \"mysterious\", \"joyful\".\n * `preference_score`: (String) Always exactly \"very high\".\n * `aesthetic_score`: (String) Always exactly \"very high\".\n6. `photographic_characteristics`: (Object)\n * `depth_of_field`: (String) E.g., \"shallow\", \"deep\", \"bokeh background\".\n * `focus`: (String) E.g., \"sharp focus on subject\", \"soft focus\", \"motion blur\".\n * `camera_angle`: (String) E.g., \"eye-level\", \"low angle\", \"high angle\", \"dutch angle\".\n * `lens_focal_length`: (String) E.g., \"wide-angle\", \"telephoto\", \"macro\", \"fisheye\". (If the main subject is a person, prefer \"standard lens (e.g., 35mm-50mm)\" or \"portrait lens (e.g., 50mm-85mm)\" to ensure they are framed more closely. Avoid \"wide-angle\" for people unless specified).\n7. `style_medium`: (String) Identify the artistic style or medium based on the user's prompt or creative interpretation (e.g., \"photograph\", \"oil painting\", \"watercolor\", \"3D render\", \"digital illustration\", \"pencil sketch\").\n8. `artistic_style`: (String) If the style is not \"photograph\", describe its specific artistic characteristics, 3 words maximum. (e.g., \"impressionistic, vibrant, textured\" for an oil painting).\n9. `context`: (String) Provide a general description of the type of image this would be. For example: \"This is a concept for a high-fashion editorial photograph intended for a magazine spread,\" or \"This describes a piece of concept art for a fantasy video game.\"\n10. `text_render`: (Array of Objects) By default, this array should be empty (`[]`). Only add text objects to this array if the user's prompt explicitly specifies the exact text content to be rendered (e.g., user asks for \"a poster with the title 'Cosmic Dream'\"). Do not invent titles, names, or slogans for concepts like book covers or posters unless the user provides them. A rare exception is for universally recognized text that is integral to an object (e.g., the word 'STOP' on a 'stop sign'). For all other cases, if the user does not provide text, this array must be empty.\n * `text`: (String) The exact text content provided by the user. NEVER use generic placeholders.\n * `location`: (String) E.g., \"center\", \"top-left\", \"bottom-right foreground\".\n * `size`: (String) E.g., \"medium\", \"large\", \"large within frame\".\n * `color`: (String) E.g., \"red\", \"blue\", \"green\".\n * `font`: (String) E.g., \"realistic\", \"cartoonish\", \"minimalist\", \"serif typeface\".\n * `appearance_details`: (String) Any other notable visual details.\n11. `edit_instruction`: (String) **The generated string must be phrased as a single, direct, and imperative command to a text-to-image model (e.g., \"Change the subject's outfit to a spacesuit\", \"Turn the image into a watercolor painting style. Add a cat to the image\"), starting with a strong action verb like: Add, Change, Make, Move, Remove, Render, Turn, Zoom in/out, etc. ** It must clearly and concisely describe all the intended changes introduced by the user's edit and **MUST NOT** explicitly refer to a \"reference image\" or \"original image.\"\n\n**Output Format Rules (these take precedence over anything above):**\n* Return raw JSON only: no Markdown code fences, no commentary before or after.\n* `aesthetics` must always contain `preference_score` and `aesthetic_score`, both set to exactly \"very high\".\n* Omit any key that does not apply instead of writing `null`, `\"\"`, `[]`, or `{}`. For example, leave out the human-only keys (`pose`, `expression`, `clothing`, `action`, `gender`, `skin_tone_and_texture`) for non-human objects, `number_of_objects` for objects that are not clusters, and `text_render` entirely when there is no text to render.\n* All other keys listed above are required, with non-empty values.\n\n**Message Format:** Each user message contains a reference image followed by:\n\n[EDIT INSTRUCTIONS]:\n<the user's edit request>\n\nUse the provided image as a visual reference only. Analyze its key elements (like the subject and pose) and then generate a new, detailed JSON object for the scene described in the edit instructions. Do not describe the reference image itself; describe the new scene. Follow all of the rules above."
},
"_meta": {
"title": "String (System Prompt VGL)"
}
},
"13": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Change the background to a snow-covered city street at blue hour, with soft falling snow, blurred shop lights and wet pavement behind her."
},
"_meta": {
"title": "String (User Prompt)"
}
},
"15": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"13",
0
],
"on_true": [
"30",
0
],
"switch": True
},
"_meta": {
"title": "If/Else Switch (PE on/off)"
}
},
"24": {
"class_type": "ImageCompare",
"inputs": {
"compare_view": None,
"image_a": [
"10",
0
],
"image_b": [
"7",
0
]
},
"_meta": {
"title": "Compare Images"
}
},
"25": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"15",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"26": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"10",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"27": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_8b_int8_convrot.safetensors",
"device": "default",
"type": "fibo2"
},
"_meta": {
"title": "Load CLIP (PE)"
}
},
"30": {
"class_type": "TextGenerateV2",
"inputs": {
"clip": [
"27",
0
],
"images.image1": [
"26",
0
],
"max_length": 3000,
"mtp": "auto",
"prompt": [
"13",
0
],
"sampling_mode": "on",
"sampling_mode.min_p": 0.05,
"sampling_mode.presence_penalty": 0,
"sampling_mode.repetition_penalty": 1.05,
"sampling_mode.seed": 0,
"sampling_mode.temperature": 0.3,
"sampling_mode.top_k": 20,
"sampling_mode.top_p": 0.95,
"system_prompt": [
"12",
0
],
"thinking": False,
"use_default_template": True
},
"_meta": {
"title": "Generate Text"
}
}
})
workflow.set_input("10", "image", client.assets.from_url("https://comfy.org/catalog-media/e1b7bd68-f672-4ddd-9236-b55fe6e15992/d04cb553-fa47-478b-92f3-2b4f3fb4302f"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("7"):
output.to_file(output.name)例を試す
このワークフローについて
Same graph as the Turbo template loaded with the full non-distilled Fibo 2.0 Dev weights: 50 steps at CFG 5 with Bria's structured negative, for the cleanest edits when sampling time is not the constraint. The optional prompt enhancer rewrites the instruction into a structured caption; switch it off to sample the raw prompt. Graph: LoadImage (source) -> BatchImagesNode -> TextGenerateV2 (the prompt enhancer: qwen3vl_8b_int8, system prompt "VGL", max_length 3000, sampling on, thinking off) -> ComfySwitchNode (on_true = enhancer output, on_false = the raw instruction) -> TextEncodeFibo2 (structured negative prompt, images as reference latents, flux2 VAE) -> KSampler (euler/simple, 50 steps, CFG 5, denoise 1, fibo2_dev_int8) -> VAEDecode -> SaveImage. ImageCompare and PreviewAny are attached for viewing only; SaveImage is the single terminal output. The page's form exposes the source image, the edit instruction, the enhancer toggle (on in the shipped graph), steps and the seed. The instruction feeds the primitive the enhancer reads, so it is used either way: enhancer on -> a local vision model rewrites it into the caption Fibo was trained on; enhancer off -> the raw text goes straight to the encoder. Steps are exposed because Dev and Turbo differ there (50 vs 4). `comfy workflow validate --where cloud` reports unknown_enum_value for two of the three weights — fibo2_dev_int8_convrot.safetensors (377-entry unet list) and qwen3vl_8b_int8_convrot.safetensors (81-entry clip list, the enhancer's text model); flux2-vae.safetensors validates. Those are local int8 weights outside the CLI's enumerated catalog, and an enum miss is not proof a model is absent (a live runnable record serves weights missing from the same lists), so no weight was swapped to make validation pass and the first real run is what settles it. The card still is the repo's own render of this graph (output/image_fibo2_edit_dev_pe.png). One example is attached: it uses the template's own render, and selecting it fills the form with the settings that graph shipped with.
関連するワークフロー
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
キャラクターターンアラウンドを作成
- Qwen-Image-Edit
素材を変更
- Qwen-Image-Edit
被写体を新しいアングルから見る
- Flux.2 Dev, Flux
製品モックアップを作成
- Nano Banana Pro
キャラクターに衣装を試着
- Seedream
商品を新しいシーンに配置
- SSeedVR2
アップスケールとディテール復元
- Nano Banana Pro
商品写真をシャープに
- Topaz
イラストをアップスケール
- HHitPaw
ポートレートのディテールを復元
- FLUX.1 Fill
選択した領域を編集
- FLUX.1 Fill
画像の境界を拡張