modelscope / modelscope/DiffSynth-Studio
How to add kontext_images from an image file?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 1.3k
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 45
Description
Hi!
I am following example for FLUX and kontext model inference: https://github.com/modelscope/DiffSynth-Studio/blob/main/examples/flux/model_inference/FLUX.1-Kontext-dev.py
Problem comes as I would like to open an existent image and set it as kontext_image parameter:
image_2 = pipe(
prompt="transform the style to anime style.",
kontext_images=image_1, #How to load image_1 from file?
embedded_guidance=2.5,
seed=2,
)
I tried using
Image.open(...)
but doesn't work.
Thanks very much!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked examples/flux/model_inference/FLUX.1-Kontext-dev.py example and inspect how the kontext_images argument is consumed. Reproduce the call using an existing image loaded with Image.open(...), then confirm that the inference completes and the resulting image is produced without an input-type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, machine-learning
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100