Skip to content

Update params.seed when -S is not given#30

Open
gpakosz wants to merge 1 commit into
antirez:mainfrom
gpakosz:fix-cli-seed
Open

Update params.seed when -S is not given#30
gpakosz wants to merge 1 commit into
antirez:mainfrom
gpakosz:fix-cli-seed

Conversation

@gpakosz
Copy link
Copy Markdown

@gpakosz gpakosz commented Feb 8, 2026

This PR fixes the following use case

$ ./flux -d flux-klein-4b -p "Some random bug" -W 512 -H 512 -o output.png
...
Seed: 1770589003
...
$ ./flux -d flux-klein-4b -S 1770589003 -p "Some random bug" -W 512 -H 512 -o output.png

Generating different images.

Kartones added a commit to Kartones/iris.c that referenced this pull request Apr 2, 2026
Comment thread main.c
Copy link
Copy Markdown

@clort81 clort81 Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The params.seed is the seed given to the program

        case 'S': params.seed = atoll(optarg); break;

the actual_seed is the seed actually used by the program.

Setting params.seed to the randomly generated seed has no effect. And makes no logical sense, since no seed was passed as a parameter.

I suggest closing this.

[Edit:] Sorry I hadn't looked into iris_cli. There i see
static int generate_image(....
params.seed = actual_seed;

Not sure about that cli stuff. Sorry for my comment, leaving it up though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants