A Discrete Voxel Diffusion Method for 3D Generation and Editing
By directly generating binary sparse voxel occupancy through the discrete diffusion method, the problems of representation mismatch and hole breakage in the 3D generation process in the prior art are solved, realizing efficient and interpretable 3D generation and editing, and improving the reliability and efficiency of the generation process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SEVEN THINGS (BEIJING) NETWORK TECHNOLOGY CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-06-02
AI Technical Summary
Existing two-stage 3D generation methods suffer from representation mismatch, holes and breaks, uninterpretable uncertainties, and training-inference mismatch issues during the conversion from continuous latent space to discrete voxels, making it difficult to directly model in discrete voxel space and achieve efficient editing.
The discrete diffusion method is used to directly generate binary sparse voxel occupancy. By using uniform prior discrete diffusion for forward perturbation and reverse denoising sampling, the output class distribution prediction is obtained. Combined with block structure perturbation fine-tuning, high consistency repair and editing are achieved, reducing additional network evaluation.
It improves voxel fidelity and geometric quality, enhances the interpretability of the generation process, reduces editing computational overhead, reduces hole breakage, provides voxel-level and shape-level uncertainty assessment, and enables efficient 3D generation and editing.
Smart Images

Figure CN122134969A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of generative artificial intelligence and 3D computer graphics, specifically involving a method for generating, evaluating and editing sparse voxel occupancy meshes based on a discrete diffusion model. It is applicable to conditional generation tasks such as image-to-3D and text-to-3D, as well as a two-stage 3D generation system based on voxel scaffolding and structured latent variables. Background Technology
[0002] 3D content generation has wide applications in games, film and television, industrial design, and other fields. Many existing two-stage 3D generation methods employ the following workflow: the first stage generates a low-resolution sparse voxel occupancy mesh as a spatial scaffold; the second stage generates continuous latent variables on the occupancy voxels and decodes them to obtain 3D representations such as the mesh, signed distance function, and 3D Gaussian splashing. Current first-stage methods typically compress voxel occupancy into a continuous latent space, then generate the latent variable using a continuous diffusion model, and finally decode and threshold it to obtain a binary occupancy.
[0003] The above-described continuous-to-discrete conversion has at least the following problems:
[0004] 1) Representing mismatch: Voxel occupancy is essentially a discrete binary variable, while thresholding after generating a continuous latent space will introduce uncontrollable errors;
[0005] 2) Holes and Fragments: In thin or fine structures, small errors in the continuous field near the threshold can easily lead to occupancy flips, creating local holes that are amplified in subsequent decoding stages, such as... Figure 3 As shown;
[0006] 3) Uncertainty is not interpretable: Continuous diffusion is usually approximated by Gaussian posterior with parameters such as mean, making it difficult to directly obtain the category uncertainty of discrete occupancy and use it for quality assessment;
[0007] 4) Patch / Edit Training-Inference Mismatch: When directly fixing known voxels and sampling only the masked region, the noise during model training is usually spatially uniform. During inference, the context and the target region exhibit strong heterogeneous perturbation, leading to inconsistency between the generated and the context. Patch strategies such as iterative resampling introduce additional network evaluation overhead.
[0008] Therefore, there is an urgent need for a technical solution that can directly model in discrete voxel space, output interpretable uncertainties, and achieve voxel editing / repair with low overhead. Summary of the Invention
[0009] The technical problem to be solved by this invention is to provide a discrete voxel diffusion method for 3D generation and editing, which directly generates binary sparse voxel occupancy and reduces thresholding artifacts; provides an uncertainty metric based on prediction entropy to achieve voxel-level and shape-level evaluation; and enables the model to complete highly consistent patching and editing in a single sampling through block structure perturbation fine-tuning, without the need for additional model evaluation or complex post-processing.
[0010] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0011] A discrete voxel diffusion method for 3D generation and editing includes the following steps:
[0012] Step 1) Obtain or construct a voxel representation of the target 3D object, representing it with a resolution of [resolution value missing]. Discrete voxel occupied grid ;
[0013] Step 2) Establish a discrete diffusion positive perturbation process, such that any voxel is subjected to a time parameter of... The data is gradually perturbed from its state to the prior distribution, and the perturbation distribution satisfies:
[0014] ;
[0015] in Assuming a uniform prior distribution, For follow A monotonically decreasing scheduling function;
[0016] Step 3) Apply a discrete diffusion neural network to a voxel grid after a given perturbation. and time parameters In this case, the output corresponds to the class distribution prediction of the clean voxel state. ;
[0017] Step 4) Construct an inverse denoising transition distribution based on the predicted category distribution and perform ancestor sampling, iterating along a preset time grid to obtain... The generated voxels occupy a grid at each time step;
[0018] Step 5) The generated voxel occupancy mesh is used as the spatial scaffolding of the 3D generation pipeline and input to the subsequent continuous latent variable generation and decoding module to output the 3D asset.
[0019] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing according to the present invention, the... For cosine scheduling function: .
[0020] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing of the present invention, the discrete diffusion neural network outputs a class probability distribution for each voxel position and normalizes it using a softmax function.
[0021] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing of the present invention, it further includes an uncertainty scoring step: calculating the voxel-level prediction entropy for the category probability distribution:
[0022] ; The predicted entropy is then aggregated to obtain a shape-level uncertainty score: ;
[0023] It can be used for sample quality assessment, sample screening, or data augmentation.
[0024] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing of the present invention, it further includes a block structure perturbation fine-tuning step: generating a block structure mask on the voxel mesh formed by the union of multiple axis-aligned cubic blocks. Discrete diffusion positive perturbation is applied only to the masked area to construct local strong perturbation training samples, and the discrete diffusion neural network is fine-tuned based on these samples to improve the consistency of patching or editing.
[0025] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing according to the present invention, the block structure mask generation includes: selecting a set of scales. For each scale, randomly sample several axis-aligned cube blocks. The block positions are random and overlap is allowed. Take the union of all blocks to form a binary mask. .
[0026] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing according to the present invention, in repair or...
[0027] Execute during editing inference:
[0028] Probabilistic replacement: Masking of a known region The voxel locations covered are used to replace the class distribution in the model output with the corresponding known classes. The one-hot distribution;
[0029] Category backfilling: During the sampling process, category backfilling is performed on known regions to ensure that the output meets the known voxel constraints.
[0030] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing according to the present invention, the discrete diffusion neural network further receives image conditional encoding or text conditional encoding as conditional input at the input end. And by freely guiding the classifier, conditional and unconditional predictions can be combined:
[0031] .
[0032] As a further preferred embodiment of the discrete voxel diffusion method for 3D generation and editing of the present invention, centering and tanh truncation are performed on the binary class network output logits:
[0033]
[0034] Used to limit the magnitude of logits and improve training or sampling stability.
[0035] A discrete voxel diffusion apparatus for a discrete voxel diffusion method for 3D generation and editing, comprising:
[0036] The voxel construction module is used to construct the binary voxel occupancy grid;
[0037] The forward perturbation module is used to perform discrete diffusion forward perturbations;
[0038] The probability prediction module is used to output the class distribution of the clean state of voxels;
[0039] The backsampling module is used to perform ancestor sampling based on the category distribution to generate a voxel mesh;
[0040] The uncertainty assessment module is used to calculate the prediction entropy and output a shape-level uncertainty score;
[0041] The block structure fine-tuning module is used to generate block structure masks and perform fine-tuning training;
[0042] The Repair & Edit module is used to perform probability replacement and category backfilling on known areas to complete repair or editing.
[0043] Compared with the prior art, the present invention, employing the above technical solution, has the following technical effects:
[0044] This invention discloses a discrete voxel diffusion method for 3D generation and editing. This method directly models the voxel occupancy state as a discrete variable, generating a low-resolution sparse voxel occupancy mesh through uniform prior discrete diffusion forward perturbation and reverse denoising sampling. The prediction entropy is calculated using the class distribution output by the model, yielding voxel-level and shape-level uncertainty scores. Block structure perturbation fine-tuning enables the model to complete voxel repair and editing within a single sampling trajectory, and context-consistent reconstruction is achieved through probabilistic replacement and class backfilling of known regions. This invention improves voxel fidelity and geometric quality, enhances the interpretability of the generation process, and reduces the computational cost of editing.
[0045] 1) Reduce void breaks: Direct modeling in discrete occupied space avoids thin-layer structure flipping caused by continuous latent variable decoding and thresholding, such as... Figure 4 The comparison shown;
[0046] 2) Higher interpretability: The model explicitly outputs the class distribution, allowing direct calculation of prediction entropy and localization of ambiguous voxel regions, such as... Figure 6 As shown;
[0047] 3) Quantifiable quality and complexity: Shape-level uncertainty scoring can be used for data filtering, evaluation, and enhancement;
[0048] 4) Highly efficient editing / repairing: After fine-tuning the block structure perturbation, repair or editing can be completed in single-trajectory sampling, reducing additional network evaluation overhead;
[0049] 5) Easy integration: As the first-stage replacement module of the two-stage structured latent variable pipeline, it is compatible with the existing second-stage latent variable generation and decoding module. Attached Figure Description
[0050] Figure 1 This is a schematic diagram of the two-stage three-dimensional generation pipeline and the forward and reverse diffusion process of discrete voxels in this invention;
[0051] Figure 2 A schematic diagram comparing traditional voxel-by-voxel independent perturbation with block structure perturbation masking;
[0052] Figure 3 This is a schematic diagram illustrating the structural instability caused by thresholding in continuous methods.
[0053] Figure 4 Comparison of examples of holes and fractures generated by the continuous method with the results of the present invention;
[0054] Figure 5 This is a schematic diagram illustrating the evolution of occupancy probability at different time steps using the discrete method of the present invention, showing the coarse-to-fine generation process;
[0055] Figure 6 This is a visualization diagram of the voxel uncertainty based on prediction entropy in this invention;
[0056] Figure 7 A schematic diagram showing the sorting of samples for different uncertainty scores;
[0057] Figure 8 This is a schematic diagram illustrating an example of single-track editing and repair after fine-tuning according to the present invention. Detailed Implementation
[0058] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention. The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments. The purpose and effects of the present invention will become clearer. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0059] This invention aims to provide a discrete voxel diffusion generation and editing scheme, which: directly generates binary sparse voxel occupancy, reducing thresholding artifacts; provides an uncertainty metric based on prediction entropy, enabling voxel-level and shape-level evaluation; and enables the model to complete highly consistent patching and editing within a single sampling through block structure perturbation fine-tuning, without the need for additional model evaluation or complex post-processing. Specific Implementation
[0060] like Figures 1 to 8 As shown, Scheme A: Discrete voxel diffusion generation:
[0061] A discrete voxel diffusion method for 3D generation and editing includes the following steps:
[0062] S1: Voxel Representation Construction: Representing 3D objects as voxels with a resolution of [missing information]. Binary voxels occupy the grid , where 1 indicates that the voxel is occupied, and 0 indicates that the voxel is empty.
[0063] S2: Discrete Diffusion Forward Process: Treat each voxel as a discrete random variable, and take the number of states for binary occupancy. Assume a uniform prior distribution. For any voxel at location, time is defined. The marginal disturbance distribution is as follows:
[0064] ;
[0065] in For follow A monotonically decreasing function satisfies , This process is equivalent to... As the number of voxels increases, their states are gradually reset to near-uniform randomness.
[0066] For all element meshes This can be achieved by position-independent factorization:
[0067] ;
[0068] in The total number of voxels.
[0069] S3: Reverse Denoising Process and Ancestor Sampling: Constructing a Discrete Diffusion Neural Network In a voxel mesh with a given perturbation and time parameters (and optional condition information) outputs the clean state. Category distribution prediction:
[0070]
[0071] in for 3D probability simplex.
[0072] Based on this prediction, an approximate inverse posterior is constructed:
[0073] ;
[0074] in This is the theoretical backward posterior distribution calculated based on Bayes' theorem.
[0075] Along the preset time grid Iterative ancestor sampling:
[0076] ;
[0077] In the final step Residual noise can be removed by replacing sampling with the category with the highest probability.
[0078] ;
[0079] S4: Training Objective:
[0080] Training is performed by minimizing the lower bound of the negative evidence corresponding to discrete diffusion or its equivalent form:
[0081] ;
[0082] in The loss function is a voxel-by-voxel function, the specific form of which depends on the discrete diffusion variant used.
[0083] S5: Integration with subsequent stages: Integrating the generated voxels This serves as the scaffolding input for the second stage of structured latent variable generation and decoding, in order to obtain the final 3D asset.
[0084] Option B: Uncertainty scoring based on prediction entropy:
[0085] S6: Voxel-level prediction entropy calculation: For a given The model is for each voxel location Output category distribution Its predicted entropy is:
[0086]
[0087] S7: Shape-level uncertainty scoring aggregation: defining a threshold Only retain The voxel entropy is aggregated into shape-level scores:
[0088]
[0089] Preferred in Near-zero time step calculation Furthermore, the value can be scaled logarithmically to enhance its discriminative power.
[0090] S8: Application of Uncertainty Scoring:
[0091] Will Used for: Sample quality assessment: Identifying samples with rich detail or obvious ambiguous regions;
[0092] Data filtering: Filtering low-quality samples;
[0093] Data augmentation: for The top-ranked samples are sampled at a higher frequency for training or fine-tuning.
[0094] Option C: Fine-tuning and single-track repair / editing of block structure perturbations
[0095] S9: Block structure mask generation:
[0096] Select several scale sets on the voxel grid. For each scale, randomly sample several axis-aligned cube blocks, with random block positions and allowed overlap. Take the union of all blocks to form a binary mask. .
[0097] S10: Heterogeneous perturbation structure:
[0098] Only The application of positive perturbation in the region resulted in locally severe damage. ,and The area remains close The discrete diffusion neural network was fine-tuned using this sample distribution, enabling it to learn to complete the perturbation region under the condition of "clean context + strong local noise".
[0099] S11: Single-track patching / editing inference:
[0100] Given a known region mask Compared with known voxel categories (When a binary value is used, it is either 0 or 1):
[0101] 1) Probability Replacement: After each model prediction step, the predicted distribution of the known region is directly replaced with the one-hot distribution of the known class, thereby forcing the condition:
[0102]
[0103] 2) Ancestor sampling: Sampling is performed based on the replaced distribution to obtain the next state;
[0104] 3) Category backfilling: Perform category backfilling on the known regions at each step or in the last step to ensure that the output strictly meets the known voxel constraints.
[0105] This method, after fine-tuning, can complete the completion in a single time-grid iteration without requiring additional resampling loops.
[0106] The present invention will be further described below with reference to embodiments. It should be understood that the embodiments are only used to explain the present invention and are not intended to limit the scope of protection of the present invention.
[0107] 1.1 Two-stage structured latent variable representation: For three-dimensional objects, a set of structured latent variables is used:
[0108]
[0109] in For the voxel location index, This is the continuous latent vector to which the voxel is attached. To occupy the total number of voxels, The resolution is voxel grid.
[0110] The first stage generates the occupancy set (or binary occupancy grid). The second stage generates at the occupied location. And decode to obtain a three-dimensional representation. This invention focuses on replacing the first stage.
[0111] 1.2 Discrete Voxel Diffusion Forward Process: Treat each voxel as a discrete variable (for binary occupancy...) Assume a uniform prior. For any voxel at location, time is defined. The marginal disturbance distribution is as follows:
[0112]
[0113] in For follow A monotonically decreasing function satisfies , This embodiment uses cosine tuning:
[0114]
[0115] For all element meshes This can be achieved by position-independent factorization:
[0116]
[0117] in The total number of voxels is taken in this embodiment. .
[0118] 1.3 Reverse Process and Ancestor Sampling: Reverse Denoising by Neural Networks Output the predicted class distribution for the clean state:
[0119]
[0120] This embodiment uses a DiT architecture as the backbone network and can optionally receive image encoding or text encoding as conditional input.
[0121] Based on this prediction, an approximate inverse posterior is constructed:
[0122]
[0123] in This is the theoretical backward posterior distribution calculated based on Bayes' theorem.
[0124] Along the preset time grid Iterative ancestor sampling is performed. This embodiment takes... The time grid uses linear, equally spaced intervals.
[0125] The sampling algorithm is as follows:
[0126] Algorithm 1: Discrete Diffusion Ancestor Sampling
[0127] 1: Input: Initial noise (Uniform random sampling), time grid 2: for to do3: , 4: Model Prediction: 5: Calculate the posterior distribution according to formula (3). 6: if then7: Ancestor sampling: 8: else9: Final noise reduction: , 10: end if 11: 12: end for 13: Output: Generate voxel mesh
[0128] 1.4 The training objective uses the lower bound of negative evidence corresponding to discrete diffusion as the training objective. For a uniform prior discrete diffusion model, the volumetric loss...
[0129] The loss function can be expressed as:
[0130]
[0131] in , , for The index corresponding to non-zero items, for right The derivative of .
[0132] The AdamW optimizer was used during training, and the learning rate was set to... The weight decays to It employs cosine learning rate decay and 5000-step linear preheating.
[0133] 1.5 Prediction Entropy and Shape-Level Uncertainty Score: For a given The model is for each voxel location Output category distribution Its predicted entropy is:
[0134]
[0135] Define threshold Only retain The voxel entropy is aggregated into shape-level scores:
[0136]
[0137] This embodiment takes ,exist Near-zero time step calculation .
[0138] Application Example: Data Augmentation
[0139] training set The top 10% of samples are sampled more frequently for training or fine-tuning to enhance the ability to generate complex objects. In this embodiment, after 300K steps of basic training, high-resolution samples are generated. The sample oversampling is performed with 100K steps of fine-tuning, as shown in Table 3. This method can further improve the generation quality.
[0140] 1.6 Block Structure Perturbation Fine-tuning: Block Mask Generation:
[0141] Selecting scale sets on a voxel grid In this embodiment, For each scale, randomly sample several axis-aligned cube blocks, with random block positions and allowed overlap. Take the union of all blocks to form a binary mask. .
[0142] The block mask generation algorithm is as follows:
[0143] Algorithm 2: Block Structure Mask Generation
[0144] 1: Initialize the mask
[0145] 2: Sampling target disturbance ratio
[0146] 3: For each scale : 4: Calculate the maximum possible number of blocks at this scale:
[0147] 5: Sampling weights Calculate the actual number of blocks after normalization.
[0148] 6: for to do 7: Starting position of random sampling block
[0149] 8: Define block regions:
[0150] 9: ,
[0151] 10: end for 11: end for 12: Output mask
[0152] Heterogeneous perturbation construction and fine-tuning
[0153] Only The application of positive perturbation in the region resulted in locally severe damage. ,and The area remains close Disturbance intensity With a bias towards a larger proportion of disturbances.
[0154] Fine-tuning the model for 100K steps using this sample distribution, with the learning rate set to [value missing]. .
[0155] 1.7 Single-Track Repair / Editing Reasoning: Given a Known Region Mask Compared with known voxel categories The repair / edit inference algorithm is as follows:
[0156] Algorithm 3: Single-trajectory repair / editing reasoning:
[0157] 1: Input: Known region mask Known categories Time grid 2: Initialization Unknown regions sample uniform noise, known regions are filled with noise. 3: for to do4: , 5: Model Predictions: 6: Probabilistic replacement: For a known region, , st 7: Calculate the posterior distribution according to formula (3). 8: Ancestor Sampling: 9: Category backfilling: For known areas, , st 10: 11: end for 12: Output: Repaired / edited voxel mesh
[0158] This method, after fine-tuning, can complete the completion in one time grid iteration without the need for additional resampling loops, significantly reducing computational overhead.
[0159] 1.8 Conditional Generation and Classifier Free Guidance: For image-to-3D or text-to-3D tasks, Discrete Diffusion Neural Networks Reception Conditional Encoding As an additional input:
[0160]
[0161] The classifier is freely guided to combine conditional and unconditional predictions:
[0162]
[0163] in To guide the intensity, this embodiment takes .
[0164] 1.9 Numerical Stability Optimization: For the binary discrete diffusion model, the logits of the network output are centered and truncated with tanh to improve training and sampling stability.
[0165] Algorithm 4: Centralization and tanh truncation of logits
[0166] 1: Input: raw logits
[0167] 2: Saturation parameter
[0168] 3:
[0169] 4:
[0170] 5: logits
[0171] 6: Output: truncated logits
[0172] This optimization limits the lower probability bound to approximately [value missing]. To avoid numerical instability caused by overconfidence.
[0173] 1.10 Output and Application: The output results can be: binary voxel-occupied mesh; complete 3D mesh generated after the second stage;
[0174] Edited or repaired 3D assets. These can be used for applications such as 3D content generation, asset editing, automatic repair, and quality control.
[0175] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.
[0176] It will be understood by those skilled in the art that the above descriptions are merely preferred examples of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions described in the foregoing examples or make equivalent substitutions for some of the technical features. All modifications and equivalent substitutions made within the spirit and principles of the invention should be included within the scope of protection of the invention. All technical features in this embodiment can be freely combined according to actual needs.
[0177] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A discrete voxel diffusion method for 3D generation and editing, characterized in that, Includes the following steps: Step 1) Obtain or construct a voxel representation of the target 3D object, representing it with a resolution of [resolution value missing]. Discrete voxel occupied grid ; Step 2) Establish a discrete diffusion positive perturbation process, such that any voxel is subjected to a time parameter of... The data is gradually perturbed from its state to the prior distribution, and the perturbation distribution satisfies: ; in Assuming a uniform prior distribution, For follow A monotonically decreasing scheduling function; Step 3) Apply a discrete diffusion neural network to a voxel grid after a given perturbation. and time parameters In this case, the output corresponds to the class distribution prediction of the clean voxel state. ; Step 4) Construct an inverse denoising transition distribution based on the predicted category distribution and perform ancestor sampling, iterating along a preset time grid to obtain... The generated voxels occupy a grid at each time step; Step 5) The generated voxel occupancy mesh is used as the spatial scaffolding of the 3D generation pipeline and input to the subsequent continuous latent variable generation and decoding module to output the 3D asset.
2. The discrete voxel diffusion method for 3D generation and editing according to claim 1, characterized in that, The For cosine scheduling function: .
3. The discrete voxel diffusion method for 3D generation and editing according to claim 1, characterized in that, The discrete diffusion neural network outputs a class probability distribution for each voxel location, which is then normalized using the softmax function.
4. The discrete voxel diffusion method for 3D generation and editing according to claim 1, characterized in that, It also includes an uncertainty scoring step: calculating the voxel-level prediction entropy for the category probability distribution. ; The predicted entropy is then aggregated to obtain a shape-level uncertainty score: ; It can be used for sample quality assessment, sample screening, or data augmentation.
5. The discrete voxel diffusion method for 3D generation and editing according to claim 1, characterized in that, It also includes a block structure perturbation fine-tuning step: generating a block structure mask on the voxel mesh formed by the union of multiple axis-aligned cubic blocks. Discrete diffusion positive perturbation is applied only to the masked area to construct local strong perturbation training samples, and the discrete diffusion neural network is fine-tuned based on these samples to improve the consistency of patching or editing.
6. A discrete voxel diffusion method for 3D generation and editing according to claim 5, characterized in that, The block structure mask generation includes: selecting a set of scales. For each scale, randomly sample several axis-aligned cube blocks. The block positions are random and overlap is allowed. Take the union of all blocks to form a binary mask. .
7. A discrete voxel diffusion method for 3D generation and editing according to claim 5, characterized in that, Execute when patching or editing inference: Probabilistic replacement: Masking of a known region The voxel locations covered are used to replace the class distribution in the model output with the corresponding known classes. The one-hot distribution; Category backfilling: During the sampling process, category backfilling is performed on known regions to ensure that the output meets the known voxel constraints.
8. The discrete voxel diffusion method for 3D generation and editing according to claim 1, characterized in that, The discrete diffusion neural network further receives image condition codes or text condition codes as conditional inputs at its input end. And by freely guiding the classifier, conditional and unconditional predictions can be combined: 。 9. A discrete voxel diffusion method for 3D generation and editing according to claim 1, characterized in that, Centralization and tanh truncation are performed on the binary class network output logits: ; Used to limit the magnitude of logits and improve training or sampling stability.
10. A discrete voxel diffusion apparatus based on the discrete voxel diffusion method for 3D generation and editing according to any one of claims 1 to 9, characterized in that, include: The voxel construction module is used to construct the binary voxel occupancy grid; The forward perturbation module is used to perform discrete diffusion forward perturbations; The probability prediction module is used to output the class distribution of the clean state of voxels; The backsampling module is used to perform ancestor sampling based on the category distribution to generate a voxel mesh; The uncertainty assessment module is used to calculate the prediction entropy and output a shape-level uncertainty score; The block structure fine-tuning module is used to generate block structure masks and perform fine-tuning training; The Repair & Edit module is used to perform probability replacement and category backfilling on known areas to complete repair or editing.