Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1//go:build mlx
2
3package zimage
4
5import (
6 "math"
7
…lines 8–144 unchanged (137 lines)

After

1package zimage
2
3import (
4 "math"
5
6 "github.com/ollama/ollama/x/imagegen/mlx"
7)
…lines 8–142 unchanged (135 lines)

Before

source_file
comment "//go:build mlx"
package_clause
package "package"
package_identifier "zimage"
import_declaration
import "import"
import_spec_list
( "("
import_spec
interpreted_string_literal
" "\""
interpreted_string_literal_content "math"
" "\""
import_spec
interpreted_string_literal
" "\""
interpreted_string_literal_content "github.com/ollama/ollama/x/imagegen/mlx"
" "\""
) ")"
comment "// FlowMatchSchedulerConfig holds scheduler configuration"
type_declaration (+33 nodes collapsed)
comment "// DefaultFlowMatchSchedulerConfig returns default config"
function_declaration (+45 nodes collapsed)
comment "// FlowMatchEulerScheduler implements the Flow Match Euler d"...
comment "// This is used in Z-Image-Turbo for fast sampling"
type_declaration (+32 nodes collapsed)
comment "// NewFlowMatchEulerScheduler creates a new scheduler"
function_declaration (+35 nodes collapsed)
comment "// SetTimesteps sets up the scheduler for the given number o"...
method_declaration (+33 nodes collapsed)
comment "// SetTimestepsWithMu sets up the scheduler with dynamic mu "...
method_declaration (+186 nodes collapsed)
comment "// timeShift applies the dynamic time shift (match Python)"
method_declaration (+87 nodes collapsed)
comment "// Step performs one denoising step"
comment "// modelOutput: predicted velocity/noise from the model"
comment "// timestepIdx: current timestep index"
comment "// sample: current noisy sample"
comment "// Returns: denoised sample for next step"
method_declaration (+111 nodes collapsed)
comment "// ScaleSample scales the sample for model input (identity f"...
method_declaration (+41 nodes collapsed)
comment "// GetTimestep returns the timestep value at the given index"
method_declaration (+55 nodes collapsed)
comment "// GetTimesteps returns all timesteps (implements Scheduler "...
method_declaration (+29 nodes collapsed)
comment "// AddNoise adds noise to clean samples for a given timestep"
comment "// Used for img2img or inpainting"
method_declaration (+107 nodes collapsed)
comment "// InitNoise creates initial noise for sampling (BFloat16 fo"...
method_declaration (+58 nodes collapsed)
comment "// GetLatentShape returns the latent shape for a given image"...
function_declaration (+68 nodes collapsed)

After

source_file
package_clause
package "package"
package_identifier "zimage"
import_declaration
import "import"
import_spec_list
( "("
import_spec
interpreted_string_literal
" "\""
interpreted_string_literal_content "math"
" "\""
import_spec
interpreted_string_literal
" "\""
interpreted_string_literal_content "github.com/ollama/ollama/x/imagegen/mlx"
" "\""
) ")"
comment "// FlowMatchSchedulerConfig holds scheduler configuration"
type_declaration (+33 nodes collapsed)
comment "// DefaultFlowMatchSchedulerConfig returns default config"
function_declaration (+45 nodes collapsed)
comment "// FlowMatchEulerScheduler implements the Flow Match Euler d"...
comment "// This is used in Z-Image-Turbo for fast sampling"
type_declaration (+32 nodes collapsed)
comment "// NewFlowMatchEulerScheduler creates a new scheduler"
function_declaration (+35 nodes collapsed)
comment "// SetTimesteps sets up the scheduler for the given number o"...
method_declaration (+33 nodes collapsed)
comment "// SetTimestepsWithMu sets up the scheduler with dynamic mu "...
method_declaration (+186 nodes collapsed)
comment "// timeShift applies the dynamic time shift (match Python)"
method_declaration (+87 nodes collapsed)
comment "// Step performs one denoising step"
comment "// modelOutput: predicted velocity/noise from the model"
comment "// timestepIdx: current timestep index"
comment "// sample: current noisy sample"
comment "// Returns: denoised sample for next step"
method_declaration (+111 nodes collapsed)
comment "// ScaleSample scales the sample for model input (identity f"...
method_declaration (+41 nodes collapsed)
comment "// GetTimestep returns the timestep value at the given index"
method_declaration (+55 nodes collapsed)
comment "// GetTimesteps returns all timesteps (implements Scheduler "...
method_declaration (+29 nodes collapsed)
comment "// AddNoise adds noise to clean samples for a given timestep"
comment "// Used for img2img or inpainting"
method_declaration (+107 nodes collapsed)
comment "// InitNoise creates initial noise for sampling (BFloat16 fo"...
method_declaration (+58 nodes collapsed)
comment "// GetLatentShape returns the latent shape for a given image"...
function_declaration (+68 nodes collapsed)